mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-12-05 02:11:32 +00:00
Fix webservice authentication bug caused by pylint streak
This commit is contained in:
parent
1738b541e8
commit
b5156d437b
@ -27,12 +27,10 @@ class UserOps:
|
||||
User.username == self.username
|
||||
).first()
|
||||
|
||||
passw_is_correct = PasswordHasher.verify(
|
||||
self.password,
|
||||
user.passwordhash
|
||||
)
|
||||
|
||||
if not user or not passw_is_correct:
|
||||
if not user or not PasswordHasher.verify(
|
||||
self.password,
|
||||
user.passwordhash
|
||||
):
|
||||
self.log(f'Invalid credentials for user "{self.username}"!')
|
||||
raise InvalidCredentialsError
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user