Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Fix flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
temparus committed Nov 18, 2023
1 parent d8f705c commit b056324
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions amivapi/auth/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ def process_login(items):
user = _find_user(ldap_username)

Check warning on line 189 in amivapi/auth/sessions.py

View check run for this annotation

Codecov / codecov/patch

amivapi/auth/sessions.py#L189

Added line #L189 was not covered by tests
if user:
app.logger.error(
f"User '{ldap_username}' authenticated with LDAP and found "
"in db, but LDAP sync failed.")
f"User '{ldap_username}' authenticated with LDAP and "
"found in db, but LDAP sync failed.")
else:
status = (f"Login failed: user '{ldap_username}' authenticated "
"with LDAP but not found in db, and LDAP sync "
"failed.")
status = (f"Login failed: user '{ldap_username}' "

Check warning on line 195 in amivapi/auth/sessions.py

View check run for this annotation

Codecov / codecov/patch

amivapi/auth/sessions.py#L195

Added line #L195 was not covered by tests
"authenticated with LDAP but not found in db, "
"and LDAP sync failed.")
app.logger.error(status)
abort(401, description=debug_error_message(status))

Expand Down

0 comments on commit b056324

Please sign in to comment.