diff options
Diffstat (limited to 'app/utils.py')
-rw-r--r-- | app/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/utils.py b/app/utils.py index cb6a315..21c7fd6 100644 --- a/app/utils.py +++ b/app/utils.py @@ -68,7 +68,10 @@ def make_flask_user_password(plaintext_str): import bcrypt plaintext = plaintext_str.encode("UTF-8") password = bcrypt.hashpw(plaintext, bcrypt.gensalt()) - return password.decode("UTF-8") + if isinstance(password, str): + return password + else: + return password.decode("UTF-8") def _do_login_user(user, remember_me=False): def _call_or_get(v): |