Explorar el Código

Fixes #20585: Fix AttributeError exception for conditionless single-field UniqueConstraints (#20590)

Jeremy Stretch hace 4 meses
padre
commit
c902a1c510
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/netbox/monkey.py

+ 1 - 1
netbox/netbox/monkey.py

@@ -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