From aeac76d58425f2e81f3aa4ae38f3b77562c51959 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 20 Jan 2023 11:12:47 -0800 Subject: [PATCH] 11487 remove set null from read-only custom fields bulk edit --- netbox/netbox/forms/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/forms/base.py b/netbox/netbox/forms/base.py index d69445e78..b4ad39b5e 100644 --- a/netbox/netbox/forms/base.py +++ b/netbox/netbox/forms/base.py @@ -131,7 +131,7 @@ class NetBoxModelBulkEditForm(BootstrapMixin, CustomFieldsMixin, forms.Form): def _extend_nullable_fields(self): nullable_custom_fields = [ - name for name, customfield in self.custom_fields.items() if not customfield.required + name for name, customfield in self.custom_fields.items() if (not customfield.required and customfield.ui_visibility == CustomFieldVisibilityChoices.VISIBILITY_READ_WRITE) ] self.nullable_fields = (*self.nullable_fields, *nullable_custom_fields)