Skip to content

Commit 604ad0d

Browse files
committed
NPL-450 fix name grouping in COT detail view
1 parent b879c4d commit 604ad0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

netbox_custom_objects/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,18 +160,18 @@ def get_table(self, data, request, bulk_actions=True):
160160

161161
def get_extra_context(self, request, instance):
162162
model = instance.get_model()
163-
163+
164164
# Get fields and group them by group_name
165165
fields = instance.fields.all().order_by("group_name", "weight", "name")
166-
166+
167167
# Group fields by group_name
168168
field_groups = {}
169169
for field in fields:
170170
group_name = field.group_name or None # Use None for ungrouped fields
171171
if group_name not in field_groups:
172172
field_groups[group_name] = []
173173
field_groups[group_name].append(field)
174-
174+
175175
return {
176176
"custom_objects": model.objects.all(),
177177
"table": self.get_table(self.queryset, request),

0 commit comments

Comments
 (0)