models: don't save the procedure before the state transition
Otherwise a validation error occurs here instead of on save.
This commit is contained in:
parent
93124195fc
commit
48133c2595
1 changed files with 1 additions and 1 deletions
|
@ -712,7 +712,7 @@ class Procedure < ApplicationRecord
|
|||
private
|
||||
|
||||
def before_publish
|
||||
update!(closed_at: nil, unpublished_at: nil)
|
||||
assign_attributes(closed_at: nil, unpublished_at: nil)
|
||||
end
|
||||
|
||||
def after_publish(canonical_procedure = nil)
|
||||
|
|
Loading…
Reference in a new issue