From 8f3dad0b791fa33af84bbbfdcd323b0ba77c2af0 Mon Sep 17 00:00:00 2001 From: Ashutosh singh <55102089+Ashutosh619-sudo@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:40:15 +0530 Subject: [PATCH] tasklog_status filter added (#268) Co-authored-by: Ashutosh619-sudo --- apps/fyle/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/fyle/views.py b/apps/fyle/views.py index 35699aa6..029fb847 100644 --- a/apps/fyle/views.py +++ b/apps/fyle/views.py @@ -16,11 +16,11 @@ class ExpenseGroupView(LookupFieldMixin, generics.ListCreateAPIView): """ serializer_class = ExpenseGroupSerializer - queryset = ExpenseGroup.objects.filter(tasklog__status="COMPLETE").order_by( + queryset = ExpenseGroup.objects.filter().order_by( "-updated_at" ) serializer_class = ExpenseGroupSerializer - filterset_fields = {"exported_at": {"gte", "lte"}} + filterset_fields = {"exported_at": {"gte", "lte"}, "tasklog__status": {"exact"}} class ExpenseGroupSettingsView(generics.RetrieveAPIView):