diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 0412fb8ed..39dc2c7ae 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -1,6 +1,5 @@ class Dossier < ApplicationRecord include DossierFilteringConcern - include VirusScanConcern enum state: { brouillon: 'brouillon', @@ -99,9 +98,6 @@ class Dossier < ApplicationRecord after_save :send_web_hook after_create :send_draft_notification_email - after_commit :create_dossier_virus_scan - after_initialize { add_virus_scan_on(self.justificatif_motivation) } - validates :user, presence: true def update_search_terms @@ -417,8 +413,4 @@ class Dossier < ApplicationRecord ) end end - - def create_dossier_virus_scan - create_virus_scan(self.justificatif_motivation) - end end diff --git a/app/views/new_user/dossiers/show/_download_justificatif.html.haml b/app/views/new_user/dossiers/show/_download_justificatif.html.haml index 555f2638f..509c594e0 100644 --- a/app/views/new_user/dossiers/show/_download_justificatif.html.haml +++ b/app/views/new_user/dossiers/show/_download_justificatif.html.haml @@ -1,6 +1,6 @@ - if dossier.present? - justificatif = dossier.justificatif_motivation - - if dossier.justificatif_motivation.attached? and dossier.virus_scan.safe? + - if dossier.justificatif_motivation.attached? and dossier.justificatif_motivation.virus_scanner.safe? .action = link_to (justificatif), target: '_blank', class: 'button primary' do %span.icon.download