Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

Commit

Permalink
chore: cute sort only if no sort properties
Browse files Browse the repository at this point in the history
  • Loading branch information
dantetemplar committed Nov 24, 2024
1 parent a4a5c82 commit 21e864e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/modules/events/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def key(event: Event):
return 2

events = await events_repository.read_with_filters(filters, sort, pagination)
if not sort.date:
if not sort.date and not sort.age and not sort.participant_count:
# sort default: current events, future events, past events
events = sorted(events, key=key)

Expand Down

0 comments on commit 21e864e

Please sign in to comment.