Closed bvirgilioamnh closed 1 month ago
This is the problematic line: https://github.com/dfir-iris/iris-web/blob/7123a2ac6ab399648e7e4b940dbea766cdb0e42f/source/app/blueprints/alerts/alerts_routes.py#L497C1-L497C91
I'm not sure the "proper" fix here but the other batch routes iterate over each alert and call the module hook each time:
alert = call_modules_hook('on_postload_alert_update', data=alert)
whereas the delete just passes all the alert_ids:
alert = call_modules_hook('on_postload_alert_delete', data={"alert_ids": {alert_ids}})
Possible fix might be to wrap the hook call in a loop like the others or remove the {} wrapper on alert_ids and pass the original list of alert IDs. I don't currently have a development environment setup, but this looks like it could be an easy fix.
Looking at the git blame for that line, I think commit c6d6f3e7abe0ba7f0dce605765c56825f3f1c46c by @whikernel erroneously removed the format string which rendered the alert_ids as the list.
I think the correct solution is to indeed remove the {} on alert_ids and just pass it as a variable as this is how it was originally being handled (albeit still incorrectly based on the changes in the commit).
This is now fixed in v2.4.13
Describe the bug When attempting to delete multiple alerts via the bulk selection the server errors out and the alerts are never deleted. The close alert functionality works fine.
To Reproduce Steps to reproduce the behavior:
Expected behavior Deletion of selected alerts.
Screenshots
Desktop (please complete the following information): N/A
Smartphone (please complete the following information): N/A
Additional context None currently