diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 102a6af7a..b901b9e92 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -229,10 +229,6 @@ class Dossier < ApplicationRecord DossierFieldService.get_value(self, table, column) end - def self.sanitize_for_order(order) - sanitize_sql_for_order(order) - end - def owner_name if etablissement.present? etablissement.entreprise_raison_sociale diff --git a/app/services/dossier_field_service.rb b/app/services/dossier_field_service.rb index 2420ba072..ceb6b9051 100644 --- a/app/services/dossier_field_service.rb +++ b/app/services/dossier_field_service.rb @@ -131,7 +131,7 @@ class DossierFieldService end if sorted_ids.nil? - sorted_ids = dossiers.includes(includes).where(where).order(Dossier.sanitize_for_order(order)).pluck(:id) + sorted_ids = dossiers.includes(includes).where(where).order(order).pluck(:id) end sorted_ids