Skip to content

Commit

Permalink
fix: Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sumseer committed Feb 4, 2025
1 parent 4114195 commit bbd1050
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/routes/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def activate_user(activation_data: UserActivationRequestSchema, db: Session = De
detail="Invalid or expired activation token."
)
if (
utc.localize(user.activation_token.expires_at) < datetime.now(timezone.utc)
user.activation_token.expires_at < datetime.now(timezone.utc)
or user.activation_token.token != activation_data.token
):
raise HTTPException(
Expand Down Expand Up @@ -161,6 +161,7 @@ def password_reset_completion(
db.commit()

except SQLAlchemyError:
db.rollback()
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail="An error occurred while resetting the password."
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class UserRegistrationResponseSchema(BaseModel):


class UserActivationRequestSchema(BaseModel):
email: str
email: EmailStr
token: str


Expand Down

0 comments on commit bbd1050

Please sign in to comment.