From cd2a1be9e0e3df34af4d4960c0e5486b259c5ebf Mon Sep 17 00:00:00 2001 From: ajugo Date: Tue, 4 Apr 2023 11:25:02 +0200 Subject: [PATCH] Fix linked protocol without linked_at [SCI-8255] (#5249) --- app/models/protocol.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/protocol.rb b/app/models/protocol.rb index a3f6ea348..e9be27aa0 100644 --- a/app/models/protocol.rb +++ b/app/models/protocol.rb @@ -348,6 +348,8 @@ class Protocol < ApplicationRecord end def newer_than_parent? + return linked? if linked_at.nil? + linked? && updated_at > linked_at end