fix(module_2_filter):fixed order by latest

This commit is contained in:
bobbyvish
2024-07-12 16:00:55 +05:30
parent 91dba0308c
commit 83efd28687

View File

@@ -1010,7 +1010,7 @@ class EventListView(generics.ListAPIView):
# Replace 'latest' with '-created_on' in the ordering fields
ordering = ",".join(
"-start_date" if field == "latest" else f"-{field}"
"start_date" if field == "latest" else f"-{field}"
for field in ordering_fields
)
# Apply the ordering to the queryset