Skip to content

Commit c902a1c

Browse files
Fixes #20585: Fix AttributeError exception for conditionless single-field UniqueConstraints (#20590)
1 parent b4acc3f commit c902a1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/netbox/monkey.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def get_unique_validators(field_name, model_field):
2222
# START custom logic
2323
conditions = {
2424
cond for cond in conditions
25-
if cond.referenced_base_fields == field_set
25+
if cond is None or cond.referenced_base_fields == field_set
2626
}
2727
# END custom logic
2828

0 commit comments

Comments
 (0)