Archive only when path changes owner
This commit is contained in:
parent
be51802983
commit
2770f1db82
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ class ProcedurePath < ApplicationRecord
|
|||
end
|
||||
|
||||
def publish!(new_procedure)
|
||||
if procedure&.publiee?
|
||||
if procedure&.publiee? && procedure != new_procedure
|
||||
procedure.archive!
|
||||
end
|
||||
update!(procedure: new_procedure)
|
||||
|
|
Loading…
Reference in a new issue