misc cleanup

This commit is contained in:
smilerz
2021-05-02 20:06:53 -05:00
parent e345d2eb39
commit 984d5aae11
5 changed files with 7 additions and 8 deletions

View File

@ -163,7 +163,7 @@ def import_url(request):
elif isinstance(ing['amount'], float) \
or isinstance(ing['amount'], int):
ingredient.amount = ing['amount']
ingredient.note = ing['note'] if 'note' in ing else ''
ingredient.note = ing['note'].strip() if 'note' in ing else ''
ingredient.save()
step.ingredients.add(ingredient)