You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mainapp | await instance.save(using_db=db, force_create=True)
mainapp | File "/usr/local/lib/python3.9/site-packages/tortoise/models.py", line 927, in save
mainapp | await self._pre_save(db, update_fields)
mainapp | File "/usr/local/lib/python3.9/site-packages/tortoise/models.py", line 875, in _pre_save
mainapp | await asyncio.gather(*listeners)
mainapp | File "/usr/local/lib/python3.9/site-packages/fastapi_admin/providers/login.py", line 78, in pre_save_admin
mainapp | instance.password = hash_password(instance.password)
mainapp | File "/usr/local/lib/python3.9/site-packages/fastapi_admin/utils.py", line 23, in hash_password
mainapp | return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
mainapp | AttributeError: 'str' object has no attribute 'decode'
The text was updated successfully, but these errors were encountered:
sakthiRatnam
changed the title
im not able to create a admin cannto bcrypt this password is saying
im not able to create a admin cannot bcrypt this password is saying
Feb 9, 2022
mainapp | await instance.save(using_db=db, force_create=True)
mainapp | File "/usr/local/lib/python3.9/site-packages/tortoise/models.py", line 927, in save
mainapp | await self._pre_save(db, update_fields)
mainapp | File "/usr/local/lib/python3.9/site-packages/tortoise/models.py", line 875, in _pre_save
mainapp | await asyncio.gather(*listeners)
mainapp | File "/usr/local/lib/python3.9/site-packages/fastapi_admin/providers/login.py", line 78, in pre_save_admin
mainapp | instance.password = hash_password(instance.password)
mainapp | File "/usr/local/lib/python3.9/site-packages/fastapi_admin/utils.py", line 23, in hash_password
mainapp | return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
mainapp | AttributeError: 'str' object has no attribute 'decode'
The text was updated successfully, but these errors were encountered: