Просмотр исходного кода

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 дней назад
Родитель
Сommit
69895c9885
1 измененных файлов с 2 добавлено и 2 удалено
  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',
         ]