mirror of
https://github.com/netbox-community/netbox.git
synced 2025-09-06 06:13:36 -06:00
Fix inverted logic
This commit is contained in:
parent
8ff2bc5dff
commit
78b55b8515
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user