From 55dca41434b7fce24c96b3fa5e62e213fb588cd2 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 7 Mar 2023 10:44:44 +0100 Subject: [PATCH] Fix archive/restore propagation [SCI-8004] --- app/controllers/protocols_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index bd5be2e73..6ef38b0d8 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -1107,10 +1107,12 @@ class ProtocolsController < ApplicationController begin Protocol.transaction do @protocols.find_each do |protocol| + protocol = protocol.parent if protocol.parent_id protocol.method(action).call(current_user) end end - rescue + rescue StandardError => e + Rails.logger.error e.message rollbacked = true end