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

Update crud_user.py

Open pycub opened this issue 3 years ago • 2 comments

Due to the fact that update() will receive its data through UserUpdate, its data may or may not consist "password". I added .get("password") to prevent any KeyError exception.

pycub avatar Dec 13 '21 15:12 pycub

password is optional in UserUpdate. It should be considered to use .get() instead of directly accessing in within crud.update()

pycub avatar Dec 13 '21 15:12 pycub

Nice solution, but unfortunately it's duplicated: #346

osouza-de avatar Apr 25 '22 15:04 osouza-de

Thanks! This was handled in another PR, so I'll close this one. But thanks for the effort! :coffee:

tiangolo avatar Mar 07 '24 23:03 tiangolo