remove misc flag references

This commit is contained in:
Michael Genson 2025-07-11 16:33:59 +00:00
commit 754f43c135
6 changed files with 0 additions and 9 deletions

View file

@ -440,7 +440,6 @@ class RepositoryRecipes(HouseholdRepositoryGeneric[Recipe, RecipeModel]):
)
q = (
q.join(settings_alias, self.model.settings)
.filter(settings_alias.disable_amount == False) # noqa: E712 - required for SQLAlchemy comparison
.outerjoin(unmatched_foods_query, self.model.id == unmatched_foods_query.c.recipe_id)
.outerjoin(total_user_foods_query, self.model.id == total_user_foods_query.c.recipe_id)
.filter(

View file

@ -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,

View file

@ -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:

View file

@ -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,
),
)

View file

@ -167,7 +167,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()

View file

@ -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)