Explorar el Código

fix(circuits): Persist CircuitType owner field

CircuitTypeForm rendered `owner` twice and did not persist ownership
because the displayed fields didn't match the fields processed by the
form. Remove `owner` from the fieldset and include it in `Meta.fields`
to keep rendering and form processing in sync.

Fixes #21397
Martin Hauser hace 1 semana
padre
commit
69895c9885
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      netbox/circuits/forms/model_forms.py

+ 2 - 2
netbox/circuits/forms/model_forms.py

@@ -91,13 +91,13 @@ class ProviderNetworkForm(PrimaryModelForm):
 
 
 class CircuitTypeForm(OrganizationalModelForm):
 class CircuitTypeForm(OrganizationalModelForm):
     fieldsets = (
     fieldsets = (
-        FieldSet('name', 'slug', 'color', 'description', 'owner', 'tags'),
+        FieldSet('name', 'slug', 'color', 'description', 'tags'),
     )
     )
 
 
     class Meta:
     class Meta:
         model = CircuitType
         model = CircuitType
         fields = [
         fields = [
-            'name', 'slug', 'color', 'description', 'comments', 'tags',
+            'name', 'slug', 'color', 'description', 'owner', 'comments', 'tags',
         ]
         ]