mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-28 01:09:37 +02:00
Merge pull request #348 from seanmorley15/fix-sorting-by-date
Update `apply_sorting` and `get_queryset` methods in `adventures/view…
This commit is contained in:
commit
0a8ff18560
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ class AdventureViewSet(viewsets.ModelViewSet):
|
|||
order_direction = self.request.query_params.get('order_direction', 'asc')
|
||||
include_collections = self.request.query_params.get('include_collections', 'true')
|
||||
|
||||
valid_order_by = ['name', 'type', 'date', 'rating', 'updated_at']
|
||||
valid_order_by = ['name', 'type', 'start_date', 'rating', 'updated_at']
|
||||
if order_by not in valid_order_by:
|
||||
order_by = 'name'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue