Skip to content

Commit

Permalink
update VaFacility#get_locations to remove nils from return (#993)
Browse files Browse the repository at this point in the history
some facilities have nils for address values
  • Loading branch information
PhilipDeFraties authored Aug 21, 2024
1 parent 8a83483 commit e87b07e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/va_facility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class VaFacility < ApplicationRecord
scope :get_classification_counts, -> (facility_type) { where(classification: facility_type, hidden: false).size }
scope :get_classifications, -> { pluck(:classification).uniq }
scope :get_ids, -> { pluck(:id) }
scope :get_locations, -> { order(:street_address_state).pluck(:street_address_state).uniq }
scope :get_locations, -> { order(:street_address_state).pluck(:street_address_state).uniq.compact }
scope :get_complexity, -> { order(:fy17_parent_station_complexity_level).pluck(:fy17_parent_station_complexity_level).uniq }
scope :get_relevant_attributes, -> {
select(:street_address_state, :official_station_name, :id, :visn_id, :common_name, :station_number, :latitude,
Expand Down Expand Up @@ -43,4 +43,3 @@ def clear_caches
(practices + practices_through_diffusion).uniq.each(&:clear_searchable_cache)
end
end

0 comments on commit e87b07e

Please sign in to comment.