Preserve query parameters on redirect after clicking "add another"

This commit is contained in:
Jeremy Stretch 2017-09-01 12:28:34 -04:00
parent f5c265b7b5
commit 237a889f54

View File

@ -214,7 +214,7 @@ class ObjectEditView(GetReturnURLMixin, View):
UserAction.objects.log_edit(request.user, obj, msg)
if '_addanother' in request.POST:
return redirect(request.path)
return redirect(request.get_full_path())
return_url = form.cleaned_data.get('return_url')
if return_url is not None and is_safe_url(url=return_url, host=request.get_host()):