Skip to content

Commit

Permalink
fix: sort workshops and presentations
Browse files Browse the repository at this point in the history
  • Loading branch information
azare242 committed Nov 29, 2023
1 parent 847f28c commit 23fb5e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/backend_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class WorkshopViewSet(viewsets.GenericViewSet,
def list(self, request, year=None, **kwargs):
if year is None:
year = datetime.datetime.now().year
self.queryset = models.Workshop.objects.filter(year=year)
self.queryset = models.Workshop.objects.filter(year=year).order_by('start_date')
return super().list(request, **kwargs)

def retrieve(self, request, year=None, pk=None):
Expand All @@ -124,7 +124,7 @@ class PresentationViewSet(viewsets.GenericViewSet,
def list(self, request, year=None, **kwargs):
if year is None:
year = datetime.datetime.now().year
self.queryset = self.queryset.filter(year=year)
self.queryset = self.queryset.filter(year=year).order_by('start_date')
return super().list(request, **kwargs)

def retrieve(self, request, year=None, pk=None):
Expand Down

0 comments on commit 23fb5e8

Please sign in to comment.