diff --git a/kdb-bot/src/bot_api/service/auth_service.py b/kdb-bot/src/bot_api/service/auth_service.py index 4c9fcaf190..bf5d9f86c1 100644 --- a/kdb-bot/src/bot_api/service/auth_service.py +++ b/kdb-bot/src/bot_api/service/auth_service.py @@ -349,7 +349,7 @@ class AuthService(AuthServiceABC): raise ServiceException(ServiceErrorCode.InvalidUser, 'Wrong password') # update password - if self._hash_sha256(update_user_dto.new_auth_user.password, user.password_salt) != user.password: + if update_user_dto.new_auth_user.password is not None and self._hash_sha256(update_user_dto.new_auth_user.password, user.password_salt) != user.password: user.password_salt = uuid.uuid4() user.password = self._hash_sha256(update_user_dto.new_auth_user.password, user.password_salt)