Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions devel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ def index(request):
same_pkgbase_key = lambda x: (x.repo.name, x.arch.name, x.pkgbase)
flagged = groupby_preserve_order(flagged_all, same_pkgbase_key)

# try to find the best representative package for a group of split packages
# (the template shows the first package in group, which should be the
# package with pkgname == pkgbase)
for group in flagged:
if len(group) > 1:
# key[0] is False when pkgname == pkgbase, so it is sorted first
group.sort(key=lambda p: (p.pkgname != p.pkgbase, p.pkgname))

todopkgs = TodolistPackage.objects.select_related(
'todolist', 'pkg', 'arch', 'repo').exclude(
status=TodolistPackage.COMPLETE).filter(removed__isnull=True)
Expand Down
Loading