Skip to content

Commit

Permalink
Put the same columns in the union-statement
Browse files Browse the repository at this point in the history
  • Loading branch information
kronn committed Dec 10, 2024
1 parent 49f5a9a commit 422870a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/domain/jubla/mailing_lists/subscribers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def excluded_subscriber_ids_with_preferences

def excluded_by_contact_preference
preference_column = "contactable_by_#{layer_type}"
return Person.none unless Person.column_names.include?(preference_column)
return Person.select(:id).none unless Person.column_names.include?(preference_column)

Person.alumnus_only.where("#{preference_column}": false).select(:id)
end
Expand Down

0 comments on commit 422870a

Please sign in to comment.