From 78b55b8515cfc35065e27d029c52d3cf091a5c7a Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 11 Aug 2025 13:49:42 -0400 Subject: [PATCH] Fix inverted logic --- netbox/extras/lookups.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/lookups.py b/netbox/extras/lookups.py index a43c01508..33296340e 100644 --- a/netbox/extras/lookups.py +++ b/netbox/extras/lookups.py @@ -37,7 +37,7 @@ class JSONEmpty(Lookup): if value not in (True, False): raise ValueError("The 'empty' lookup only accepts True or False.") - condition = 'NOT ' if value else '' + condition = '' if value else 'NOT ' sql = f"(NULLIF({lhs_sql}, '') IS {condition}NULL)" return sql, lhs_params