mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
ignore unset when writing to db (#993)
* ignore unset when writing to db * exception * add 'side' types to enum set
This commit is contained in:
parent
2211174636
commit
6ccffce320
@ -42,6 +42,7 @@ class PlanRulesType(str, Enum):
|
|||||||
breakfast = "breakfast"
|
breakfast = "breakfast"
|
||||||
lunch = "lunch"
|
lunch = "lunch"
|
||||||
dinner = "dinner"
|
dinner = "dinner"
|
||||||
|
side = "side"
|
||||||
unset = "unset"
|
unset = "unset"
|
||||||
|
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ class RecipeService(BaseService):
|
|||||||
recipe = self._pre_update_check(slug, patch_data)
|
recipe = self._pre_update_check(slug, patch_data)
|
||||||
recipe = self.repos.recipes.by_group(self.group.id).get_one(slug)
|
recipe = self.repos.recipes.by_group(self.group.id).get_one(slug)
|
||||||
|
|
||||||
new_data = self.repos.recipes.patch(recipe.slug, patch_data)
|
new_data = self.repos.recipes.by_group(self.group.id).patch(recipe.slug, patch_data.dict(exclude_unset=True))
|
||||||
|
|
||||||
self.check_assets(new_data, recipe.slug)
|
self.check_assets(new_data, recipe.slug)
|
||||||
return new_data
|
return new_data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user