1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

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()):