From 7d8209a53d4611b6e6c1187403a064577194d0fd Mon Sep 17 00:00:00 2001 From: Michal Fiedorowicz Date: Mon, 30 Dec 2024 11:17:44 +0000 Subject: [PATCH] tidy up Signed-off-by: Michal Fiedorowicz --- netbox_diode_plugin/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_diode_plugin/views.py b/netbox_diode_plugin/views.py index 411ddc0..75f884b 100644 --- a/netbox_diode_plugin/views.py +++ b/netbox_diode_plugin/views.py @@ -35,7 +35,7 @@ def redirect_to_login(request): redirect_url = netbox_settings.LOGIN_URL target = request.path - if target and url_has_allowed_host_and_scheme(request.path, allowed_hosts=None): + if target and url_has_allowed_host_and_scheme(target, allowed_hosts=None): redirect_url = f"{netbox_settings.LOGIN_URL}?next={target}" return HttpResponseRedirect(redirect_url)