add updated_at fields
This commit is contained in:
@@ -141,7 +141,7 @@ def update_shop(shop_id: int, shop_update: schemas.ShopUpdate, db: Session = Dep
|
||||
if shop is None:
|
||||
raise HTTPException(status_code=404, detail="Shop not found")
|
||||
|
||||
update_data = shop_update.dict()
|
||||
update_data = shop_update.dict(exclude_unset=True)
|
||||
for field, value in update_data.items():
|
||||
setattr(shop, field, value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user