Hello
I am getting an error while im trying to delete an account in self-hosted Open Edx. The user account I’m trying to delete is a superuser.
I have deployed using tutor and am using the latest version.
I have attached the error traceback below.
lms_1 | 2022-04-25 12:41:23,409 ERROR 7 [openedx.core.djangoapps.user_api.accounts.views] [user 8] [ip 124.123.80.200] views.py:573 - 500 error deactivating account Default state does not exist! Populate retirement states to retire users.
lms_1 | Traceback (most recent call last):
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user_api/models.py", line 342, in create_retirement
lms_1 | pending = RetirementState.objects.all().order_by('state_execution_order')[0]
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 318, in __getitem__
lms_1 | return qs._result_cache[0]
lms_1 | IndexError: list index out of range
lms_1 |
lms_1 | During handling of the above exception, another exception occurred:
lms_1 |
lms_1 | Traceback (most recent call last):
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user_api/accounts/views.py", line 539, in post
lms_1 | create_retirement_request_and_deactivate_account(request.user)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user_api/accounts/utils.py", line 201, in create_retirement_request_and_deactivate_account
lms_1 | UserRetirementStatus.create_retirement(user)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/user_api/models.py", line 344, in create_retirement
lms_1 | raise RetirementStateError('Default state does not exist! Populate retirement states to retire users.') # lint-amnesty, pylint: disable=raise-missing-from
lms_1 | openedx.core.djangoapps.user_api.models.RetirementStateError: Default state does not exist! Populate retirement states to retire users.
lms_1 | 2022-04-25 12:41:23,459 ERROR 7 [django.request] [user None] [ip None] log.py:224 - Internal Server Error: /api/user/v1/accounts/deactivate_logout/
caddy_1 |