-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Preload hooks for delete case and task #619
base: develop
Are you sure you want to change the base?
Preload hooks for delete case and task #619
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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