Skip to content

Commit 6486e46

Browse files
author
Robert Dana
committed
fix: Add missing group_id to RecipeTag and TagBase schemas
Resolves API errors (TypeError/IntegrityError) when updating recipe tags. The RecipeTag and TagBase Pydantic schemas lacked the group_id field, causing it to be stripped during API validation. This prevented the Tag database model, which requires group_id for initialization, from being processed correctly during recipe updates (PATCH) or bulk tag actions, leading to errors. This commit adds the optional group_id field to these schemas to ensure consistency with the database model requirements.
1 parent 6845b51 commit 6486e46

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mealie/schema/recipe/recipe.py

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
class RecipeTag(MealieModel):
4040
id: UUID4 | None = None
41+
group_id: UUID4 | None = None
4142
name: str
4243
slug: str
4344

mealie/schema/recipe/recipe_category.py

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class CategorySave(CategoryIn):
1616

1717
class CategoryBase(CategoryIn):
1818
id: UUID4
19+
group_id: UUID4 | None = None
1920
slug: str
2021
model_config = ConfigDict(from_attributes=True)
2122

0 commit comments

Comments
 (0)