Skip to content

Commit

Permalink
Django filters: Adding order to ExpenesGroupFilters (#259)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Ashutosh619-sudo and Ashutosh619-sudo authored Sep 12, 2023
1 parent 0ce8cee commit 8af8cad
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apps/fyle/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 8af8cad

Please sign in to comment.