#163: Sorting by title or creation time returns one entry for each version of an application
This commit is contained in:
parent
9d81a0b871
commit
4f98c0c571
@ -101,6 +101,10 @@ def overview(request):
|
|||||||
sort = sortfilter['sort']
|
sort = sortfilter['sort']
|
||||||
query = query.order_by(sort)
|
query = query.order_by(sort)
|
||||||
|
|
||||||
|
if sort.startswith('aversion_'):
|
||||||
|
# limit result to last version of an application
|
||||||
|
query = query.filter(aversion__id__in=[x.last_version.id for x in Application.objects.all()])
|
||||||
|
|
||||||
if 'reverse' in sortfilter:
|
if 'reverse' in sortfilter:
|
||||||
query = query.reverse()
|
query = query.reverse()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user