diff --git a/src/taskflower/web/invite/__init__.py b/src/taskflower/web/invite/__init__.py index 790bdf4..58add30 100644 --- a/src/taskflower/web/invite/__init__.py +++ b/src/taskflower/web/invite/__init__.py @@ -20,7 +20,7 @@ from taskflower.sanitize.code import SignUpCodeForUser, ZoneInviteCodeForUser from taskflower.types import assert_usr from taskflower.types.either import Either, Left, Right, gather_successes from taskflower.types.option import Option -from taskflower.util.time import now +from taskflower.util.time import ensure_timezone_aware, now from taskflower.web.errors import ResponseErrorBadRequest, ResponseErrorForbidden, ResponseErrorNotFound, response_from_exception from taskflower.web.utils.request import get_next @@ -241,7 +241,7 @@ def enter(): ) ).flat_map( lambda code: Either.do_assert( - code.expires > now(), + ensure_timezone_aware(code.expires) > now(), 'Code expiration date is in the future' ).map( lambda _: code