From 725cfa45d3995199d1778b53be89cc22b22edb93 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 2 Apr 2020 15:03:39 +0200 Subject: [PATCH] Do not set processed_at if already defined --- app/models/dossier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 1411b5df7..adb1de4fd 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -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