From 8645a1c7086bb516f221391cbf6ad047cfab495d Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 15 Oct 2025 12:35:13 -0400 Subject: [PATCH] Fixes #20585: Fix AttributeError exception for conditionless single-field UniqueConstraints --- netbox/netbox/monkey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/monkey.py b/netbox/netbox/monkey.py index 6a8f515df8e..be256e3ae60 100644 --- a/netbox/netbox/monkey.py +++ b/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