Hi Ingeborg,


thanks so much for your mail.


I was able to reproduce the bug and the fix for it (https://github.com/Uninett/nav/pull/2732) was just merged. A release including this fix will happen very soon.


Best regards

Johanna England

Sikt – Norwegian Agency for Shared Services in Education and Research


From: Ingeborg Hellemo <ingeborg.hellemo@uit.no>
Sent: Monday, November 13, 2023 09:31
To: nav-users@lister.sikt.no <nav-users@lister.sikt.no>
Subject: [Nav-users] Unable to deactivate alert profile
 

NAV 5.7.1
FreeBSD 12.4
Python 3.9

When visiting /alertprofiles/profile/ and choosing "Deactivate" on a profile
we get an error. Since this is not something we do every day I'm not sure if
this began after upgrading to 5.7.1 or if it has been broken for a while.
During last upgrade I also upgraded python from 3.8 to 3.9 which could have
introduced the error.




Internal Server Error: /alertprofiles/profile/remove/

RuntimeError at /alertprofiles/profile/remove/
dictionary keys changed during iteration

Request Method: POST
Request URL: https://nor01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnav.uit.no%2Falertprofiles%2Fprofile%2Fremove%2F&data=05%7C01%7Cjohanna.england%40sikt.no%7C066596899d46411baa4e08dbe4230aea%7Ccb3421467965425e83ab88f8ecb99e0d%7C1%7C0%7C638354611389692282%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2B%2Ba9Wt3a1YAoJPhp8Wb42ntkyXHaNq8LTwrz44tFiO0%3D&reserved=0
Django Version: 3.2.23
Python Executable:
Python Version: 3.9.18
Python Path: ['/usr/local/lib/python39.zip', '/usr/local/lib/python3.9',
'/usr/local/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/site-packages
', '/usr/local/lib/python3.9/site-packages', '/etc/nav/python']
Server time: Mon, 13 Nov 2023 09:25:39 +0100
Installed Applications:
('nav.models',
 'nav.web',
 'nav.django',
 'django.contrib.staticfiles',
 'django.contrib.sessions',
 'django.contrib.humanize',
 'django_filters',
 'crispy_forms',
 'crispy_forms_foundation',
 'rest_framework',
 'nav.auditlog',
 'nav.web.macwatch',
 'nav.web.geomap',
 'nav.portadmin.napalm',
 'nav.web.portadmin',
 'django.contrib.postgres')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'nav.web.auth.AuthenticationMiddleware',
 'nav.web.auth.AuthorizationMiddleware',
 'nav.django.legacy.LegacyCleanupMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.p
y", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py",
line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.9/site-packages/nav/web/alertprofiles/decorators
.py", line 47, in _handler
    return func(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/nav/web/alertprofiles/views.py",
 line 316, in profile_remove
    for data in post:

Exception Type: RuntimeError at /alertprofiles/profile/remove/
Exception Value: dictionary keys changed during iteration
Request information:
USER: [unable to retrieve the current user]

GET: No GET data

POST:
deactivate=1004 = 'Deactivate'

FILES: No FILES data


More logs avaliable.



--Ingeborg
--
Ingeborg Østrem Hellemo  --  ingeborg.hellemo@uit.no
Dep. of Information Technology  ---  Univ. of Tromsø


_______________________________________________
Nav-users mailing list -- nav-users@lister.sikt.no
To unsubscribe send an email to nav-users-leave@lister.sikt.no