Skip to content

Commit

Permalink
fix: Don't allow duplicate rate centers (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie authored Nov 3, 2024
1 parent 0394e68 commit 999ded0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rate_center/data_source/local_calling_guide.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def load_data!(**options)
SPECIAL_CASE_LATAS.select { |lata| lata.region == region }.each do |lata|
rate_centers.concat(client.fetch_rate_center_data(region:, lata: lata.code).data)
end
rate_centers.uniq!(&:exch)

next if rate_centers.empty?

data = rate_centers.sort_by { |rc| [ (rc.rcshort || rc.rc), rc.exch ] }.map do |rate_center|
Expand Down

0 comments on commit 999ded0

Please sign in to comment.