empty invalid fields to allow clone procedure
This commit is contained in:
parent
b583fe1fab
commit
f2cf3188d7
2 changed files with 38 additions and 1 deletions
|
@ -576,8 +576,13 @@ class Procedure < ApplicationRecord
|
|||
procedure.service = nil
|
||||
|
||||
transaction do
|
||||
procedure.save
|
||||
if !procedure.valid?
|
||||
procedure.errors.attribute_names.each do |attribute|
|
||||
procedure.send("#{attribute}=", nil)
|
||||
end
|
||||
end
|
||||
|
||||
procedure.save
|
||||
move_new_children_to_new_parent_coordinate(procedure.draft_revision)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue