use more idiomatic update
This commit is contained in:
parent
299c86141c
commit
96e82c75d6
2 changed files with 2 additions and 2 deletions
|
@ -49,6 +49,6 @@ class Champs::PieceJustificativeChamp < Champ
|
|||
end
|
||||
|
||||
def update_skip_pj_validation
|
||||
type_de_champ.update(options: type_de_champ.options&.merge({ :skip_pj_validation => true }) || { :skip_pj_validation => true })
|
||||
type_de_champ.update(skip_pj_validation: true)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace :after_party do
|
|||
tdcs = TypeDeChamp.where(type_champ: TypeDeChamp.type_champs.fetch(:piece_justificative))
|
||||
progress = ProgressReport.new(tdcs.count)
|
||||
tdcs.find_each do |tdc|
|
||||
tdc.update(options: tdc.options&.merge({ :skip_pj_validation => true }) || { :skip_pj_validation => true })
|
||||
tdc.update(skip_pj_validation: true)
|
||||
progress.inc
|
||||
end
|
||||
progress.finish
|
||||
|
|
Loading…
Reference in a new issue