diff --git a/app/models/procedure_presentation.rb b/app/models/procedure_presentation.rb index ab4143279..c51999419 100644 --- a/app/models/procedure_presentation.rb +++ b/app/models/procedure_presentation.rb @@ -48,7 +48,7 @@ class ProcedurePresentation < ApplicationRecord field_hash('self', 'en_construction_since', type: :date, virtual: true), field_hash('self', 'en_instruction_since', type: :date, virtual: true), field_hash('self', 'processed_since', type: :date, virtual: true), - field_hash('self', 'state', type: :enum, scope: 'instructeurs.dossiers.filterable_state') + field_hash('self', 'state', type: :enum, scope: 'instructeurs.dossiers.filterable_state', virtual: true) ] end diff --git a/spec/models/procedure_presentation_spec.rb b/spec/models/procedure_presentation_spec.rb index b0f9dced7..213358568 100644 --- a/spec/models/procedure_presentation_spec.rb +++ b/spec/models/procedure_presentation_spec.rb @@ -69,7 +69,7 @@ describe ProcedurePresentation do { "label" => "En construction depuis", "table" => "self", "column" => "en_construction_since", "classname" => "", 'virtual' => true, 'type' => :date, 'scope' => '' }, { "label" => "En instruction depuis", "table" => "self", "column" => "en_instruction_since", "classname" => "", 'virtual' => true, 'type' => :date, 'scope' => '' }, { "label" => "Terminé depuis", "table" => "self", "column" => "processed_since", "classname" => "", 'virtual' => true, 'type' => :date, 'scope' => '' }, - { "label" => "Statut", "table" => "self", "column" => "state", "classname" => "", 'virtual' => false, 'scope' => 'instructeurs.dossiers.filterable_state', 'type' => :enum }, + { "label" => "Statut", "table" => "self", "column" => "state", "classname" => "", 'virtual' => true, 'scope' => 'instructeurs.dossiers.filterable_state', 'type' => :enum }, { "label" => 'Demandeur', "table" => 'user', "column" => 'email', 'classname' => '', 'virtual' => false, 'type' => :text, "scope" => '' }, { "label" => 'Email instructeur', "table" => 'followers_instructeurs', "column" => 'email', 'classname' => '', 'virtual' => false, 'type' => :text, "scope" => '' }, { "label" => 'Groupe instructeur', "table" => 'groupe_instructeur', "column" => 'label', 'classname' => '', 'virtual' => false, 'type' => :text, "scope" => '' },