mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
updated edit and added space find methods
This commit is contained in:
@@ -62,7 +62,7 @@ def export_recipe(request):
|
||||
recipe = request.GET.get('r')
|
||||
if recipe:
|
||||
if re.match(r'^([0-9])+$', recipe):
|
||||
if recipe := Recipe.objects.filter(pk=int(recipe)).first():
|
||||
if recipe := Recipe.objects.filter(pk=int(recipe), space=request.space).first():
|
||||
form = ExportForm(initial={'recipes': recipe}, user=request.user)
|
||||
|
||||
return render(request, 'export.html', {'form': form})
|
||||
|
||||
Reference in New Issue
Block a user