Merge branch 'mealie-next' into feat/filter-shopping-lists

This commit is contained in:
Michael Genson
2024-03-06 09:11:58 -06:00
committed by GitHub
11 changed files with 278 additions and 176 deletions

View File

@@ -226,10 +226,14 @@ class ShoppingListUpdate(ShoppingListSave):
class ShoppingListOut(ShoppingListUpdate):
recipe_references: list[ShoppingListRecipeRefOut]
label_settings: list[ShoppingListMultiPurposeLabelOut]
recipe_references: list[ShoppingListRecipeRefOut] = []
label_settings: list[ShoppingListMultiPurposeLabelOut] = []
model_config = ConfigDict(from_attributes=True)
@field_validator("recipe_references", "label_settings", mode="before")
def default_none_to_empty_list(cls, v):
return v or []
@classmethod
def loader_options(cls) -> list[LoaderOption]:
return [