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
2 changed files with 2 additions and 1 deletions
|
@ -42,6 +42,7 @@ class PlanRulesType(str, Enum):
|
|||
breakfast = "breakfast"
|
||||
lunch = "lunch"
|
||||
dinner = "dinner"
|
||||
side = "side"
|
||||
unset = "unset"
|
||||
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ class RecipeService(BaseService):
|
|||
recipe = self._pre_update_check(slug, patch_data)
|
||||
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)
|
||||
return new_data
|
||||
|
|
Loading…
Reference in a new issue