Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
LucienMLD committed Jun 3, 2024
1 parent 2d616f6 commit 71e06b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/match_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class MatchFilter < ApplicationRecord
## Associations
#
belongs_to :filtrable_element, polymorphic: true, optional: true
belongs_to :filtrable_element, polymorphic: true
has_and_belongs_to_many :subjects

def experts_subjects
Expand Down Expand Up @@ -87,6 +87,8 @@ def raw_excluded_legal_forms=(legal_form_code)
end

def same_antenne_match_filter?(match_filter_collection)
# un filtre antenne prévaut sur un filtre institution
# on enlève les filtres des institution quand il y a le même sur l'antenne
return false if filtrable_element_type != 'Institution'
match_filter_collection.any? do |mf|
mf != self &&
Expand Down

0 comments on commit 71e06b7

Please sign in to comment.