Merge pull request #19 from ribaguifi/feature/order-bills

#4 Order bills by creation date DESC
This commit is contained in:
Santiago L 2022-03-11 12:18:18 +01:00 committed by GitHub
commit 4911cf4226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -178,6 +178,11 @@ class BillingView(ServiceListView):
'title': _('Billing'),
}
def get_queryset(self):
qs = super().get_queryset()
qs = sorted(qs, key=lambda x: x.created_on, reverse=True)
return qs
class BillDownloadView(CustomContextMixin, UserTokenRequiredMixin, View):
extra_context = {