fix(champs): don't fail on updated_at comparison when champ is not persisted

This commit is contained in:
Colin Darie 2024-03-18 21:22:14 +01:00
parent 4412aa7d9c
commit 455086c1d7
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
2 changed files with 14 additions and 0 deletions

View file

@ -10,6 +10,7 @@ class Dossiers::ChampsRowsShowComponent < ApplicationComponent
def updated_at_after_deposer(champ)
return if champ.dossier.depose_at.blank?
return if champ.new_record?
if champ.updated_at > champ.dossier.depose_at
champ.updated_at