Skip to content

Commit

Permalink
Fix (de)activating alert profiles
Browse files Browse the repository at this point in the history
Avoid deleting elements of the dict that is iterated over
  • Loading branch information
johannaengland committed Nov 13, 2023
1 parent ccb83d1 commit ba66164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/nav/web/alertprofiles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ba66164

Please sign in to comment.