dossier: ensure the dossier groupe_instructeur is always present

Otherwise we loose the link to the dossier's procedure, which is
definitely a bad thing.
This commit is contained in:
Pierre de La Morinerie 2020-01-28 14:58:24 +01:00
parent eb9388d59f
commit 9da4fa9f4d

View file

@ -216,6 +216,7 @@ class Dossier < ApplicationRecord
validates :user, presence: true validates :user, presence: true
validates :individual, presence: true, if: -> { procedure.for_individual? } validates :individual, presence: true, if: -> { procedure.for_individual? }
validates :groupe_instructeur, presence: true
def update_search_terms def update_search_terms
self.search_terms = [ self.search_terms = [