Default Sorting of applications by number
This commit is contained in:
parent
d84a8d2bdd
commit
2ecd552d2b
@ -99,10 +99,11 @@ def overview(request):
|
||||
else:
|
||||
sort = sortfilter['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()])
|
||||
else:
|
||||
query = query.order_by('number')
|
||||
|
||||
if 'reverse' in sortfilter:
|
||||
query = query.reverse()
|
||||
|
Loading…
Reference in New Issue
Block a user