Skip to content

Commit

Permalink
Merge pull request #287 from LleidaHack/hotfix
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
elver5041 authored Nov 4, 2024
2 parents 2d311b9 + d04ec4a commit 57ed530
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/Token.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()
Expand Down

0 comments on commit 57ed530

Please sign in to comment.