Added printReady selector

This commit is contained in:
Tiago Rascazzi
2022-01-08 14:44:28 -05:00
parent 7c48c13dce
commit 16b357e11e
4 changed files with 20 additions and 7 deletions

View File

@ -143,12 +143,13 @@ def export_recipe(request):
)
else:
pk = ''
recipe = request.GET.get('r')
if recipe:
if re.match(r'^([0-9])+$', recipe):
recipe = Recipe.objects.filter(pk=int(recipe), space=request.space).first()
pk = Recipe.objects.filter(pk=int(recipe), space=request.space).first().pk
return render(request, 'export.html', {'pk': recipe.pk})
return render(request, 'export.html', {'pk': pk})
@group_required('user')