Skip to content

Commit 0eaca97

Browse files
committed
take into account weight
1 parent 7f5b106 commit 0eaca97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox_custom_objects/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def get_form(self, model):
347347
"custom_field_groups": {},
348348
}
349349

350-
for field in self.object.custom_object_type.fields.all():
350+
for field in self.object.custom_object_type.fields.all().order_by('group_name', 'weight', 'name'):
351351
field_type = field_types.FIELD_TYPE_CLASS[field.type]()
352352
try:
353353
field_name = field.name

0 commit comments

Comments
 (0)