From e681b0811965e19a6b73c91fbbb87edf7698c76d Mon Sep 17 00:00:00 2001 From: Romil2112 Date: Mon, 20 Jul 2026 17:03:49 -0700 Subject: [PATCH] [#1094][FIX] alerts: skip owner override when alert_owner_id is in updates When batch-updating an alert with no owner, the route unconditionally set alert_owner_id to the current user, ignoring the value in the client payload. Guard the fallback so it only fires when the caller did not explicitly supply an owner. --- source/app/blueprints/rest/alerts_routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/blueprints/rest/alerts_routes.py b/source/app/blueprints/rest/alerts_routes.py index 5a5652829..065613958 100644 --- a/source/app/blueprints/rest/alerts_routes.py +++ b/source/app/blueprints/rest/alerts_routes.py @@ -473,7 +473,7 @@ def alerts_batch_update_route() -> Response: if not ac_current_user_has_customer_access(alert.alert_customer_id): return response_error('User not entitled to update alerts for the client', status=403) - if alert.alert_owner_id is None: + if alert.alert_owner_id is None and 'alert_owner_id' not in updates: updates['alert_owner_id'] = iris_current_user.id if data.get('alert_owner_id') == "-1" or data.get('alert_owner_id') == -1: