From 00d16561d5481432db5e8e7ba6df133c39f846d0 Mon Sep 17 00:00:00 2001 From: lemoer Date: Fri, 27 Dec 2024 01:22:28 +0100 Subject: [PATCH] models/ParticipationRequest: fix return types of try_reject() --- models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models.py b/models.py index 4a4eaf5..c9dabd6 100644 --- a/models.py +++ b/models.py @@ -239,7 +239,7 @@ class ParticipationRequest(SQLModel, table=True): else: raise Exception("Unknown old state " + str(self.state) + ".") - def try_reject(self, now: datetime.datetime) -> Result[RejectInTime, RejectAfterAccept | RejectAfterTimeout]: + def try_reject(self, now: datetime.datetime) -> Result[RejectInTime | RejectAfterAccept, AlreadyRejected | RejectAfterTimeout]: if self.state == ParticipationState.REQUESTED or self.state == ParticipationState.TIMEOUT: # We want to make the order in which check_for_timeout() and try_reject() is called irrelevant if self.is_timed_out(now):