diff --git a/cookbook/views/views.py b/cookbook/views/views.py index 27b9cd9ab..2dca3ceba 100644 --- a/cookbook/views/views.py +++ b/cookbook/views/views.py @@ -157,7 +157,8 @@ def recipe_view(request, pk, share=None): if not ViewLog.objects.filter(recipe=recipe, created_by=request.user, created_at__gt=(timezone.now() - timezone.timedelta(minutes=5)), space=request.space).exists(): ViewLog.objects.create(recipe=recipe, created_by=request.user, space=request.space) - if request.method == "GET": + servings = recipe.servings + if request.method == "GET" and 'servings' in request.GET: servings = request.GET.get("servings") return render(request, 'recipe_view.html', {'recipe': recipe, 'comments': comments, 'comment_form': comment_form, 'share': share, 'servings': servings}) diff --git a/requirements.txt b/requirements.txt index f69cb912f..d8a23a14f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ Django==4.2.10 -cryptography===42.0.2 +cryptography===42.0.4 django-annoying==0.10.6 django-autocomplete-light==3.9.7 django-cleanup==8.0.0