Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion backend/app/models/db_models/refresh_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class RefreshToken(Base):

@property
def is_expired(self) -> bool:
return bool(datetime.now(timezone.utc) > self.expires_at)
expires_at = self.expires_at
if expires_at.tzinfo is None:
expires_at = expires_at.replace(tzinfo=timezone.utc)
return bool(datetime.now(timezone.utc) > expires_at)

@property
def is_revoked(self) -> bool:
Expand Down
Loading