add updated_at fields

This commit is contained in:
2025-05-26 11:10:42 +02:00
parent 28db52dc2e
commit 5cd9d65e00
8 changed files with 438 additions and 4 deletions

View File

@@ -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)