Additional fixes for gift models

This commit is contained in:
2025-03-16 15:33:17 +01:00
parent b5f1c7ddcb
commit 19f3534f22
4 changed files with 116 additions and 34 deletions

View File

@@ -232,7 +232,7 @@ def read_gift_category(
elif include_gifts:
# If no event_id but include_gifts is true, just get all gifts for this category
# This is less useful without event context but included for completeness
gifts = db.query(GiftItem).filter(GiftItem.category_id == category_id).all()
gifts = db.query(GiftItemModel).filter(GiftItemModel.category_id == category_id).all()
gifts_list = gifts
# Create a new category response with the calculated values

View File

@@ -116,8 +116,6 @@ class GiftCategoryBase(BaseModel):
description: Optional[str] = None
icon: Optional[str] = None
color: Optional[str] = None
display_order: Optional[int] = 0
is_visible: Optional[bool] = True
custom_fields: Optional[Dict[str, Any]] = None