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:
Pierre de La Morinerie 2021-11-23 16:01:33 +00:00
parent 93124195fc
commit 48133c2595

View file

@ -712,7 +712,7 @@ class Procedure < ApplicationRecord
private private
def before_publish def before_publish
update!(closed_at: nil, unpublished_at: nil) assign_attributes(closed_at: nil, unpublished_at: nil)
end end
def after_publish(canonical_procedure = nil) def after_publish(canonical_procedure = nil)