Skip to content
This repository was archived by the owner on Mar 12, 2023. It is now read-only.

Commit bfcc6b1

Browse files
committed
fix patch user
1 parent 5c09184 commit bfcc6b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

design_bot/routes/registration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async def patch_user(social_web_id: str, schema: UserPatch, _: auth.User = Depen
4343
user_query = db.session.query(User.social_web_id == social_web_id)
4444
if not user_query.one_or_none():
4545
raise HTTPException(status_code=404, detail="User not found")
46-
user_query.update(**schema.dict())
46+
user_query.update(**schema.dict(exclude_unset=True))
4747
db.session.flush()
4848
return UserGet.from_orm(user_query.one())
4949

0 commit comments

Comments
 (0)