Skip to content

on_postload_event_commented webhook task fails with AttributeError: 'dict' object has no attribute 'event_title' #13

@omarix

Description

@omarix

Summary

I set up a webhook for on_postload_event_commented following the documentation. The task fails before sending the request to my endpoint. I’m using a minimal config with use_rendering: false.

Environment

  • IRIS: v2.4.19
  • Webhooks module (iris-webhooks-module): v1.0.2

Webhook configuration (minimal)

{
  "name": "on_comment",
  "active": true,
  "trigger_on": ["on_postload_event_commented"],
  "verify_ssl": false,
  "request_url": "https://example.com/webhook/on_postload_event_commented",
  "use_rendering": false,
  "request_body": {
    "comments": "comments"
  }
}

Steps to reproduce

  1. Register the webhook above.
  2. Add a comment on any event in IRIS.
  3. Check the task result.

Actual result (error)

Traceback (most recent call last):
  File "/iriswebapp/app/iris_engine/module_handler/module_handler.py", line 478, 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 175, 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 238, 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 316, in _do_web_hook
    object_name = data[0].event_title
AttributeError: 'dict' object has no attribute 'event_title'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions