From ba661642916af9813d7c59586dae345f85c71001 Mon Sep 17 00:00:00 2001 From: Johanna England Date: Mon, 13 Nov 2023 11:52:42 +0100 Subject: [PATCH] Fix (de)activating alert profiles Avoid deleting elements of the dict that is iterated over --- python/nav/web/alertprofiles/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/nav/web/alertprofiles/views.py b/python/nav/web/alertprofiles/views.py index e0ee1f60fb..228e7b7385 100644 --- a/python/nav/web/alertprofiles/views.py +++ b/python/nav/web/alertprofiles/views.py @@ -313,7 +313,7 @@ def profile_save(request): def profile_remove(request): """Removes a profile""" post = request.POST.copy() - for data in post: + for data in request.POST: if data.find("=") != -1: attr, value = data.split("=") del post[data]