UiL-OTS-labs / ppn-backend

Backend application for the adult participant administration system
https://experimenten-admin.lab.hum.uu.nl
Other
0 stars 0 forks source link

Switching secondary email to main fails #95

Closed tymees closed 2 years ago

tymees commented 2 years ago
[09/May/2022 13:13:55] ERROR [django.request:224] Internal Server Error: /api/participant/create_account/
Traceback (most recent call last):
  File "/hum/web/gw-d-lab-experimenten-admin.im.hum.uu.nl/data/env/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/hum/web/gw-d-lab-experimenten-admin.im.hum.uu.nl/data/env/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/hum/web/gw-d-lab-experimenten-admin.im.hum.uu.nl/data/env/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/hum/web/gw-d-lab-experimenten-admin.im.hum.uu.nl/data/env/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/hum/web/gw-d-lab-experimenten-admin.im.hum.uu.nl/data/env/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/hum/web/gw-d-lab-experimenten-admin.im.hum.uu.nl/data/env/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/hum/web/gw-d-lab-experimenten-admin.im.hum.uu.nl/data/env/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/hum/web/gw-d-lab-experimenten-admin.im.hum.uu.nl/data/env/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "./api/views/account_views.py", line 24, in post
    ret = create_participant_account(**data)
  File "./api/utils/create_participant_account.py", line 71, in create_participant_account
    _switch_main_email(participant, email)
  File "./api/utils/create_participant_account.py", line 248, in _switch_main_email
    existing_new_email = next(
StopIteration