From 35c4bb40402b70da42b2f3eecae6cb7a04b97188 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 29 May 2024 14:24:11 +0100 Subject: [PATCH] Fix unhappy mypy timezones This feels like it's not the right way to do it but converting event_tz to be a pendulum timezone causes other errors. This seems to work so ship it --- apps/schedule/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/schedule/base.py b/apps/schedule/base.py index fae5621bc..a12d0a474 100644 --- a/apps/schedule/base.py +++ b/apps/schedule/base.py @@ -650,7 +650,7 @@ def workshop_steward_venue(venue_id: int): .filter( WorkshopProposal.type.in_(venue.allowed_types), WorkshopProposal.is_accepted, - WorkshopProposal.scheduled_time > pendulum.now(event_tz), + event_tz.localize(WorkshopProposal.scheduled_time) > pendulum.now(event_tz.zone), WorkshopProposal.scheduled_duration.isnot(None), WorkshopProposal.hide_from_schedule.isnot(True), WorkshopProposal.user_scheduled.isnot(True),