added before_save to PieceJustificativeChamp in order to set skip_pj_validation
This commit is contained in:
parent
c93d17bcaa
commit
299c86141c
2 changed files with 19 additions and 0 deletions
|
@ -24,6 +24,8 @@ class Champs::PieceJustificativeChamp < Champ
|
|||
# content_type: ACCEPTED_FORMATS,
|
||||
# size: { less_than: MAX_SIZE }
|
||||
|
||||
before_save :update_skip_pj_validation
|
||||
|
||||
def main_value_name
|
||||
:piece_justificative_file
|
||||
end
|
||||
|
@ -45,4 +47,8 @@ class Champs::PieceJustificativeChamp < Champ
|
|||
piece_justificative_file.service_url
|
||||
end
|
||||
end
|
||||
|
||||
def update_skip_pj_validation
|
||||
type_de_champ.update(options: type_de_champ.options&.merge({ :skip_pj_validation => true }) || { :skip_pj_validation => true })
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue