feat: Redirect user to adoption notice after adding photo to an animal

This commit is contained in:
moanos [he/him] 2024-12-18 10:17:27 +01:00
parent 241841bc9b
commit 579f59580c

View File

@ -294,7 +294,7 @@ def add_photo_to_animal(request, animal_id):
form = ImageForm(in_flow=True)
return render(request, 'fellchensammlung/forms/form-image.html', {'form': form})
else:
return redirect(reverse("animal-detail", args=[animal_id]))
return redirect(reverse("adoption-notice-detail", args=[animal.adoption_notice.pk], ))
else:
form = ImageForm(in_flow=True)
return render(request, 'fellchensammlung/forms/form-image.html', {'form': form})