Skip to content

Commit

Permalink
also added space to bot
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Jan 17, 2022
1 parent c279335 commit 54721a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cookbook/views/telegram.py
Expand Up @@ -52,9 +52,7 @@ def hook(request, token):
f = ingredient_parser.get_food(ingredient)
u = ingredient_parser.get_unit(unit)

ShoppingListEntry.objects.create(
food=f, unit=u, amount=amount, created_by=request.user
)
ShoppingListEntry.objects.create(food=f, unit=u, amount=amount, created_by=request.user, space=request.space)

return JsonResponse({'data': data['message']['text']})
except Exception:
Expand Down

0 comments on commit 54721a0

Please sign in to comment.