Skip to content

Commit

Permalink
Sort the inventory by features #3
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Dec 18, 2023
1 parent 2582ebf commit e5a5231
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions product_portfolio/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,9 @@ def get_context_data(self, **kwargs):
for feature, items in group_by_simple(object_list, "feature").items():
objects_by_feature[feature].extend(items)

# Sort the dictionary by features, so "no-features" items are first
objects_by_feature = dict(sorted(objects_by_feature.items()))

# 4. Inject the Scan data when activated
scancodeio = ScanCodeIO(user)
display_scan_features = all(
Expand Down

0 comments on commit e5a5231

Please sign in to comment.