commented unused code
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9d0413ada5
commit
c4d5b3a7bf
|
|
@ -64,7 +64,9 @@ def parse_ingredient(
|
|||
|
||||
return [text.strip() if text else None for text in m.groups()]
|
||||
|
||||
def get_missing_ingredients(session):
|
||||
# this code is unused
|
||||
# TODO: add tests when this is used
|
||||
def missing_ingredients_query(session):
|
||||
cte = (
|
||||
except_(select(db.RecipeIngredient.id), select(db.RecipeIngredientParts.id))
|
||||
).alias("missing")
|
||||
|
|
@ -73,8 +75,10 @@ def get_missing_ingredients(session):
|
|||
)
|
||||
return missing
|
||||
|
||||
def reparse_ingredients(session):
|
||||
missing = get_missing_ingredients(session)
|
||||
# this code is unused
|
||||
# TODO: add tests when this is used
|
||||
def parse_missing_ingredients(session):
|
||||
missing = missing_ingredients_query(session)
|
||||
for ingredient in missing:
|
||||
parts = ingredient_to_parts(ingredient)
|
||||
session.add(parts)
|
||||
|
|
|
|||
Loading…
Reference in New Issue