Merge pull request #5652 from Keirua/fix/upload-repetition
Ensure a dossier_id is set for champs in Repetition
This commit is contained in:
commit
1ba85e6080
1 changed files with 1 additions and 0 deletions
|
@ -61,6 +61,7 @@ class Champ < ApplicationRecord
|
|||
|
||||
scope :root, -> { where(parent_id: nil) }
|
||||
|
||||
before_create :set_dossier_id, if: :needs_dossier_id?
|
||||
before_validation :set_dossier_id, if: :needs_dossier_id?
|
||||
|
||||
validates :type_de_champ_id, uniqueness: { scope: [:dossier_id, :row] }
|
||||
|
|
Loading…
Add table
Reference in a new issue