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):