refactor: change region identification method
- Update the region lookup to use `name` instead of `id` - This change allows for more flexible region identification - Improves alignment with potential data structure changes
This commit is contained in:
parent
27100aec24
commit
bafb889144
@ -22,8 +22,7 @@ namespace :geo do
|
||||
count = 1
|
||||
|
||||
regions.each do |data|
|
||||
region = Region.find_or_initialize_by(id: data["id"]) do |r|
|
||||
r.name = data["name"]
|
||||
region = Region.find_or_initialize_by(name: data["name"]) do |r|
|
||||
end
|
||||
puts "Sync Regions[#{count}/#{sum}]: [#{region.name}]"
|
||||
count += 1
|
||||
|
Loading…
Reference in New Issue
Block a user