mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-09 01:49:35 -06:00
Fixes #20585: Fix AttributeError exception for conditionless single-field UniqueConstraints (#20590)
This commit is contained in:
parent
b4acc3fb36
commit
c902a1c510
@ -22,7 +22,7 @@ def get_unique_validators(field_name, model_field):
|
||||
# START custom logic
|
||||
conditions = {
|
||||
cond for cond in conditions
|
||||
if cond.referenced_base_fields == field_set
|
||||
if cond is None or cond.referenced_base_fields == field_set
|
||||
}
|
||||
# END custom logic
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user