Skip to content

Commit

Permalink
Use new SQLAlchemy syntax, avoid supressing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Jan 8, 2025
1 parent 75e4d39 commit fb5a4de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,14 +484,14 @@ def refresh():
@json_endpoint
def suspended():
confirm_write_access()
return User.query.filter(User.suspended == True).all(), 200 # noqa: E712
return User.query.filter(User.suspended.is_(True)).all(), 200


@user_api.route("/reset_totp_requested", strict_slashes=False)
@json_endpoint
def reset_totp_requested():
confirm_write_access()
return User.query.filter(User.mfa_reset_token != None).all(), 200 # noqa: E711
return User.query.filter(User.mfa_reset_token.isnot(None)).all(), 200


@user_api.route("/activate", methods=["PUT"], strict_slashes=False)
Expand Down

0 comments on commit fb5a4de

Please sign in to comment.