Skip to content

Commit 194132c

Browse files
committed
Fix deprecation warning for Pydantic >=1.0
1 parent a7db29f commit 194132c

File tree

1 file changed

+1
-1
lines changed
  • {{cookiecutter.project_slug}}/backend/app/app/crud

1 file changed

+1
-1
lines changed

{{cookiecutter.project_slug}}/backend/app/app/crud/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def update(
4141
self, db_session: Session, *, db_obj: ModelType, obj_in: UpdateSchemaType
4242
) -> ModelType:
4343
obj_data = jsonable_encoder(db_obj)
44-
update_data = obj_in.dict(skip_defaults=True)
44+
update_data = obj_in.dict(exclude_unset=True)
4545
for field in obj_data:
4646
if field in update_data:
4747
setattr(db_obj, field, update_data[field])

0 commit comments

Comments
 (0)