Skip to content

Commit

Permalink
Merge pull request #878 from amakarudze/fix-818
Browse files Browse the repository at this point in the history
Order events by date
  • Loading branch information
amakarudze authored Mar 30, 2023
2 parents 283109b + 0de8083 commit a308b5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_event(page_url, is_user_authenticated, is_preview):
except Event.DoesNotExist:
return None
except Event.MultipleObjectsReturned:
event = Event.objects.filter(page_url=page_url).first()
event = Event.objects.filter(page_url=page_url).order_by("-date").first()

if not (is_user_authenticated or is_preview) and not event.is_page_live:
past = event.date <= now_approx
Expand Down

0 comments on commit a308b5b

Please sign in to comment.