Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error 500 when transition is unauthorised #780

Closed
Sispheor opened this issue May 14, 2024 · 1 comment
Closed

error 500 when transition is unauthorised #780

Sispheor opened this issue May 14, 2024 · 1 comment

Comments

@Sispheor
Copy link
Contributor

Sispheor commented May 14, 2024

Step to reproduce:

  • Create 2 requests to delete the same instance
  • approve and process the first one
  • approve and process the second one when the instance has been deleted

Log:

django_1         | INFO 2024-05-14 15:32:48,355 request [request_accept] request '2827' accepted and processed by 
django_1         | DEBUG 2024-05-14 15:32:48,355 request Request][process] instance 2827 is not available or pending
django_1         | ERROR 2024-05-14 15:32:48,362 log Internal Server Error: /ui/service-catalog/request/2827/accept/
django_1         | Traceback (most recent call last):
django_1         |   File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
django_1         |     response = get_response(request)
django_1         |   File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
django_1         |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
django_1         |   File "/usr/local/lib/python3.10/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
django_1         |     return view_func(request, *args, **kwargs)
django_1         |   File "/app/service_catalog/views/request.py", line 270, in request_accept
django_1         |     try_process_request(request.user, target_request)
django_1         |   File "/app/service_catalog/views/request.py", line 378, in try_process_request
django_1         |     target_request.process(user)
django_1         |   File "/usr/local/lib/python3.10/site-packages/django_fsm/__init__.py", line 573, in _change_state
django_1         |     return fsm_meta.field.change_state(instance, func, *args, **kwargs)
django_1         |   File "/usr/local/lib/python3.10/site-packages/django_fsm/__init__.py", line 345, in change_state
django_1         |     raise TransitionNotAllowed(
django_1         | django_fsm.TransitionNotAllowed: Transition conditions have not been met for method 'process'
@Sispheor
Copy link
Contributor Author

Done and available starting version 2.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant