mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-14 08:55:34 -04:00
feat: Remove "Is Food" and "Disable Amounts" Flags (#5684)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
@@ -312,12 +312,10 @@ class ShoppingListService:
|
||||
list_items: list[ShoppingListItemCreate] = []
|
||||
for ingredient in recipe_ingredients:
|
||||
if isinstance(ingredient.food, IngredientFood):
|
||||
is_food = True
|
||||
food_id = ingredient.food.id
|
||||
label_id = ingredient.food.label_id
|
||||
|
||||
else:
|
||||
is_food = False
|
||||
food_id = None
|
||||
label_id = None
|
||||
|
||||
@@ -329,7 +327,6 @@ class ShoppingListService:
|
||||
|
||||
new_item = ShoppingListItemCreate(
|
||||
shopping_list_id=list_id,
|
||||
is_food=is_food,
|
||||
note=ingredient.note,
|
||||
quantity=ingredient.quantity * scale if ingredient.quantity else 0,
|
||||
food_id=food_id,
|
||||
|
||||
@@ -177,7 +177,6 @@ class BaseMigrator(BaseService):
|
||||
show_assets=self.household.preferences.recipe_show_assets,
|
||||
landscape_view=self.household.preferences.recipe_landscape_view,
|
||||
disable_comments=self.household.preferences.recipe_disable_comments,
|
||||
disable_amount=self.household.preferences.recipe_disable_amount,
|
||||
)
|
||||
|
||||
for recipe in validated_recipes:
|
||||
|
||||
@@ -36,7 +36,6 @@ class BruteForceParser(ABCIngredientParser):
|
||||
ingredient=RecipeIngredient(
|
||||
unit=CreateIngredientUnit(name=bfi.unit),
|
||||
food=CreateIngredientFood(name=bfi.food),
|
||||
disable_amount=False,
|
||||
quantity=bfi.amount,
|
||||
note=bfi.note,
|
||||
),
|
||||
@@ -151,7 +150,6 @@ class NLPParser(ABCIngredientParser):
|
||||
quantity=qty,
|
||||
unit=CreateIngredientUnit(name=unit) if unit else None,
|
||||
food=CreateIngredientFood(name=food) if food else None,
|
||||
disable_amount=False,
|
||||
note=note,
|
||||
),
|
||||
)
|
||||
|
||||
@@ -173,7 +173,6 @@ class RecipeService(RecipeServiceBase):
|
||||
show_assets=self.household.preferences.recipe_show_assets,
|
||||
landscape_view=self.household.preferences.recipe_landscape_view,
|
||||
disable_comments=self.household.preferences.recipe_disable_comments,
|
||||
disable_amount=self.household.preferences.recipe_disable_amount,
|
||||
)
|
||||
else:
|
||||
data.settings = RecipeSettings()
|
||||
|
||||
@@ -74,7 +74,6 @@ class RegistrationService:
|
||||
recipe_show_assets=self.registration.advanced,
|
||||
recipe_landscape_view=False,
|
||||
recipe_disable_comments=self.registration.advanced,
|
||||
recipe_disable_amount=self.registration.advanced,
|
||||
)
|
||||
return HouseholdService.create_household(group_repos, household_data, household_preferences)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user