Skip to content

Commit

Permalink
fix: user verification is failed when he do not have telegram connected
Browse files Browse the repository at this point in the history
  • Loading branch information
fivan999 authored and dantetemplar committed Oct 26, 2024
1 parent dddcfee commit 802d9b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/repositories/auth/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ async def verify_user_token(cls, token: str) -> VerificationResult:
user_data = await innohassle_accounts.get_user_by_innohassle_id(innohassle_id)
if user_data is None:
raise VerificationResult(success=False)
if user_data.telegram is None:
raise VerificationResult(success=False)
return VerificationResult(success=True, telegram_id=user_data.telegram.id)
except JoseError:
raise VerificationResult(success=False)
Expand Down

0 comments on commit 802d9b1

Please sign in to comment.