Skip to content

Commit

Permalink
Improve default ordering of packages in tab_inventory #3
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Dec 14, 2023
1 parent 05a3a25 commit b852e09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ postgresdb:
@dropdb ${DB_NAME} || true
@echo "-> Create ${DB_NAME} database"
@createdb --owner=${DB_USERNAME} ${POSTGRES_INITDB_ARGS} ${DB_NAME}
@gunzip < ${DB_INIT_FILE} | psql --username=${DB_USERNAME} ${DB_NAME}

run:
${MANAGE} runserver 8000
Expand Down
7 changes: 4 additions & 3 deletions product_portfolio/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,10 @@ def tab_inventory(self):
productcomponent_qs = self.filter_productcomponent.qs.order_by(
"feature", "component", "name", "version"
).group_by("feature")
productpackage_qs = self.filter_productpackage.qs.order_by("feature", "package").group_by(
"feature"
)

productpackage_qs = self.filter_productpackage.qs.order_by(
"feature", "package__type", "package__namespace", "package__name"
).group_by("feature")

user = self.request.user
dataspace = user.dataspace
Expand Down

0 comments on commit b852e09

Please sign in to comment.