From 9e193107cd9425ff7e1e0b6560416587e7fb3713 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Fri, 11 Mar 2022 12:16:29 +0100 Subject: [PATCH] Order bills by creation date DESC --- musician/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/musician/views.py b/musician/views.py index 626f2c2..1bdc69b 100644 --- a/musician/views.py +++ b/musician/views.py @@ -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 = {