From 42f080186e502da7d3c02d205af14e62341ef807 Mon Sep 17 00:00:00 2001 From: Ton Date: Mon, 4 Nov 2024 14:56:47 +0100 Subject: [PATCH] fix --- src/utils/Token.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/Token.py b/src/utils/Token.py index ccabbdb..a801226 100644 --- a/src/utils/Token.py +++ b/src/utils/Token.py @@ -168,7 +168,7 @@ def get_data(token: str): if type == TokenType.ACCESS.value: return AccesToken(None).from_token(token) elif type == TokenType.ASSISTENCE.value: - return AssistenceToken(None).from_token(token) + return AssistenceToken(None, None).from_token(token) elif type == TokenType.REFRESH.value: return RefreshToken(None).from_token(token) elif type == TokenType.RESET_PASS.value: @@ -181,7 +181,7 @@ class AssistenceToken(BaseToken): event_id: int = 0 def __init__(self, user: User, event_id: int): - if user is None: + if user is None or event_id is None: return super().__init__(user) self.expt = (datetime.now(UTC) + timedelta(days=30)).isoformat()