Преглед изворни кода

Fix form field ordering; self.fields no longer an OrderedDict

Jeremy Stretch пре 6 година
родитељ
комит
7b93155b06
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      netbox/extras/forms.py

+ 2 - 1
netbox/extras/forms.py

@@ -467,7 +467,8 @@ class ScriptForm(BootstrapMixin, forms.Form):
             self.fields['_commit'].initial = False
             self.fields['_commit'].initial = False
 
 
         # Move _commit to the end of the form
         # Move _commit to the end of the form
-        self.fields.move_to_end('_commit', True)
+        commit = self.fields.pop('_commit')
+        self.fields['_commit'] = commit
 
 
     @property
     @property
     def requires_input(self):
     def requires_input(self):