Suggestion refacto by Tchak
Co-authored-by: Paul Chavard <paul.chavard@beta.gouv.fr>
This commit is contained in:
parent
4084f814b3
commit
ea47c2cc19
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ class DossierSearchService
|
|||
|
||||
def self.matching_dossiers_for_user(search_terms, user)
|
||||
dossier_by_exact_id_for_user(search_terms, user)
|
||||
.presence || dossier_by_full_text_for_user(search_terms, user.dossiers).presence || dossier_by_full_text_for_user(search_terms, user.dossiers_invites)
|
||||
.presence || dossier_by_full_text_for_user(search_terms, Dossier.where(id: user.dossiers.ids + user.dossiers_invites.ids))
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue