Skip to content

Commit e5a5231

Browse files
committed
Sort the inventory by features #3
Signed-off-by: tdruez <[email protected]>
1 parent 2582ebf commit e5a5231

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

product_portfolio/views.py

+3
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,9 @@ def get_context_data(self, **kwargs):
651651
for feature, items in group_by_simple(object_list, "feature").items():
652652
objects_by_feature[feature].extend(items)
653653

654+
# Sort the dictionary by features, so "no-features" items are first
655+
objects_by_feature = dict(sorted(objects_by_feature.items()))
656+
654657
# 4. Inject the Scan data when activated
655658
scancodeio = ScanCodeIO(user)
656659
display_scan_features = all(

0 commit comments

Comments
 (0)