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

GlobalTasks object has no attribute 'case' #2

Open
tobraha opened this issue Mar 28, 2023 · 0 comments · May be fixed by #3
Open

GlobalTasks object has no attribute 'case' #2

tobraha opened this issue Mar 28, 2023 · 0 comments · May be fixed by #3

Comments

@tobraha
Copy link

tobraha commented Mar 28, 2023

For hooks on_postload_global_task_{create,update}, the GlobalTasks class refers to a case object which does not exist.

[2023-03-27 21:14:05,712: INFO/ForkPoolWorker-2] Retrieved server configuration
[2023-03-27 21:14:05,718: INFO/ForkPoolWorker-2] Module has initiated
[2023-03-27 21:14:05,718: INFO/ForkPoolWorker-2] Received on_postload_global_task_create
[2023-03-27 21:14:05,718: INFO/ForkPoolWorker-2] Received on_postload_global_task_create, None
[2023-03-27 21:14:05,718: INFO/ForkPoolWorker-2] Retrieved server configuration
[2023-03-27 21:14:05,731: CRITICAL/ForkPoolWorker-2] Failed to run hook on_postload_global_task_create with module iris_webhooks_module. Error 'GlobalTasks' object has no attribute 'case'
[2023-03-27 21:14:05,731: ERROR/ForkPoolWorker-2] 'GlobalTasks' object has no attribute 'case'
Traceback (most recent call last):
  File "/iriswebapp/app/iris_engine/module_handler/module_handler.py", line 480, in task_hook_wrapper
    task_status = mod_inst.hooks_handler(hook_name, hook_ui_name, data=_obj)
  File "/opt/venv/lib/python3.9/site-packages/iris_webhooks_module/IrisWebHooksInterface.py", line 139, in hooks_handler
    status = self._handle_hook(hook_name, hook_ui_name, data=data)
  File "/opt/venv/lib/python3.9/site-packages/iris_webhooks_module/IrisWebHooksInterface.py", line 197, in _handle_hook
    self._do_web_hook(hook_name, data, hook, server_url)
  File "/opt/venv/lib/python3.9/site-packages/iris_webhooks_module/IrisWebHooksInterface.py", line 266, in _do_web_hook
    case_name = data[0].case.name
AttributeError: 'GlobalTasks' object has no attribute 'case'

PR incoming 😃

@tobraha tobraha linked a pull request Mar 28, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant