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
|
end
|
||||||
|
|
||||||
def publish!(new_procedure)
|
def publish!(new_procedure)
|
||||||
if procedure&.publiee?
|
if procedure&.publiee? && procedure != new_procedure
|
||||||
procedure.archive!
|
procedure.archive!
|
||||||
end
|
end
|
||||||
update!(procedure: new_procedure)
|
update!(procedure: new_procedure)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue