Preload hooks for delete case and task#619
Preload hooks for delete case and task#619Vladimir-A wants to merge 31 commits intodfir-iris:developfrom
Conversation
Fix reference to POSTGRES_USER variable in postgres template for kubernetes
Change reference POSTGRES_USER kubernetes template
…language [FIX] report template language
| task = get_task_with_assignees(task_id=cur_id, case_id=caseid) | ||
| if not task: | ||
| return response_error("Invalid task ID for this case") | ||
| call_modules_hook('on_preload_task_delete', data=task, caseid=caseid) |
There was a problem hiding this comment.
Maybe then we should update all preload deletions to work with a dump of the object? Normally preload hooks are only working with raw data, nothing from the DB, to avoid any conflicts.
I was acutally thinking of removing all preload in future versions. Do you have any use cases where working with preload instead of postload?
There was a problem hiding this comment.
In our case, there is no difference between preload and postload. We need to track the deletion of cases and tasks. Since postload works after the deletion of object and it is impossible to process a non-existent object with a webhook module, so I tried to restore the correct operation of preload, of course we need information about the object in the output to work with it.
Small fixes for correct work on_preload_task_delete and on_preload_case_delete hooks.
There are problems with registering hooks. Need iris-webhooks-module update FIX