Skip to content

Commit 1c32d0e

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

netbox_custom_objects/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,10 @@ def get_form(self, model):
352352
try:
353353
field_name = field.name
354354
attrs[field_name] = field_type.get_annotated_form_field(field)
355-
355+
356356
# Annotate the field in the list of CustomField form fields
357357
attrs["custom_fields"][field_name] = field
358-
358+
359359
# Group fields by group_name (similar to NetBox custom fields)
360360
group_name = field.group_name or None # Use None for ungrouped fields
361361
if group_name not in attrs["custom_field_groups"]:
@@ -369,9 +369,9 @@ def get_form(self, model):
369369
def custom_init(self, *args, **kwargs):
370370
super(form_class, self).__init__(*args, **kwargs)
371371
# Set the grouping info as instance attributes from the outer scope
372-
self.custom_fields = attrs["custom_fields"]
372+
self.custom_fields = attrs["custom_fields"]
373373
self.custom_field_groups = attrs["custom_field_groups"]
374-
374+
375375
attrs["__init__"] = custom_init
376376

377377
form_class = type(

0 commit comments

Comments
 (0)