Ignore type_de_champ procedure_id

This commit is contained in:
Paul Chavard 2020-08-27 20:14:23 +02:00
parent 36668403b6
commit 5ceae8235b
2 changed files with 3 additions and 1 deletions

View file

@ -24,7 +24,7 @@ class FindDubiousProceduresJob < CronJob
.where(procedures: { closed_at: nil, whitelisted_at: nil })
dubious_procedures_and_tdcs = forbidden_tdcs
.group_by(&:procedure_id)
.group_by { |type_de_champ| type_de_champ.procedure.id }
.map { |_procedure_id, tdcs| [tdcs[0].procedure, tdcs] }
AdministrationMailer.dubious_procedures(dubious_procedures_and_tdcs).deliver_later

View file

@ -18,6 +18,8 @@
# stable_id :bigint
#
class TypeDeChamp < ApplicationRecord
self.ignored_columns = ['procedure_id']
enum type_champs: {
text: 'text',
textarea: 'textarea',