full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

Update user without password causes error

Open turukawa opened this issue 4 years ago • 1 comments

When updating a user's details without updating the password, the backend fails. The issue is very simple:

https://github.com/tiangolo/full-stack-fastapi-postgresql/blob/490c554e23343eec0736b06e59b2108fdd057fdc/%7B%7Bcookiecutter.project_slug%7D%7D/backend/app/app/crud/crud_user.py#L34

No password is provided during update, so correct:

if update_data.get("password"):

turukawa avatar Apr 01 '21 09:04 turukawa

See this pull request https://github.com/tiangolo/full-stack-fastapi-postgresql/pull/168

NMisko avatar Apr 25 '21 13:04 NMisko