Răsfoiți Sursa

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 2 luni în urmă
părinte
comite
862593f2dd
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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):
     fieldsets = (
-        FieldSet('name', 'slug', 'color', 'description', 'owner', 'tags'),
+        FieldSet('name', 'slug', 'color', 'description', 'tags'),
     )
 
     class Meta:
         model = CircuitType
         fields = [
-            'name', 'slug', 'color', 'description', 'comments', 'tags',
+            'name', 'slug', 'color', 'description', 'owner', 'comments', 'tags',
         ]