From 8af8cadc74e6426fc2e886c1413c28bd5bace4e0 Mon Sep 17 00:00:00 2001 From: Ashutosh singh <55102089+Ashutosh619-sudo@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:44:39 +0530 Subject: [PATCH] Django filters: Adding order to ExpenesGroupFilters (#259) * django filter for xero-app * change in test cases * test case cahnge * django filter for fyle app * using generics * resolving comments * removed test case * django filter for mappings app and test changes * django filter for task app and test changes * django filter for workspaces app and test changes * ordering bug fix --------- Co-authored-by: Ashutosh619-sudo --- apps/fyle/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/fyle/views.py b/apps/fyle/views.py index 2a74f48a..30685483 100644 --- a/apps/fyle/views.py +++ b/apps/fyle/views.py @@ -16,10 +16,9 @@ class ExpenseGroupView(LookupFieldMixin, generics.ListCreateAPIView): List Fyle Expenses """ serializer_class = ExpenseGroupSerializer - queryset = ExpenseGroup.objects.filter(tasklog__status='COMPLETE') + queryset = ExpenseGroup.objects.filter(tasklog__status='COMPLETE').order_by('-updated_at') serializer_class = ExpenseGroupSerializer filterset_fields = {'exported_at': {'gte', 'lte'}} - ordering_fields = ('-updated_at',) class ExpenseGroupSettingsView(generics.RetrieveAPIView):