From 70d1ce43912b9973741998541aae9f0fd79fdefc Mon Sep 17 00:00:00 2001 From: Philipp Thun Date: Tue, 24 Mar 2026 12:35:22 +0100 Subject: [PATCH] Fix race condition in route destination updates Move route.reload inside the transaction block to ensure the returned route reflects a consistent state. Previously, a concurrent request could modify or delete the route between transaction commit and reload. --- app/actions/update_route_destinations.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/actions/update_route_destinations.rb b/app/actions/update_route_destinations.rb index c8a2c8a8ce5..ba2bcb52880 100644 --- a/app/actions/update_route_destinations.rb +++ b/app/actions/update_route_destinations.rb @@ -92,9 +92,9 @@ def update(route, to_add, to_delete, user_audit_info, manifest_triggered) end update_processes(processes_to_ports_map) - end - route.reload + route.reload + end route end