Do not set processed_at if already defined

This commit is contained in:
Paul Chavard 2020-04-02 15:03:39 +02:00
parent c3b6e7e30f
commit 725cfa45d3

View file

@ -729,7 +729,7 @@ class Dossier < ApplicationRecord
self.en_construction_at = Time.zone.now
elsif en_instruction? && !self.en_instruction_at
self.en_instruction_at = Time.zone.now
elsif TERMINE.include?(state)
elsif TERMINE.include?(state) && !self.processed_at
self.processed_at = Time.zone.now
end
end