mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-10 18:39:36 -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
|
# START custom logic
|
||||||
conditions = {
|
conditions = {
|
||||||
cond for cond in 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
|
# END custom logic
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user