lib/updateagent/updateagent.rb in onebody-updateagent-0.5.2 vs lib/updateagent/updateagent.rb in onebody-updateagent-0.5.3
- old
+ new
@@ -129,10 +129,10 @@
print "#{resource.name} 0/0\r"; STDOUT.flush
(@create + @update).each_slice(MAX_TO_BATCH_AT_A_TIME) do |records|
response = resource.post(:batch, {}, {:options => @options['remote_options'], :records => records}.to_xml)
statuses = Hash.from_xml(response.body)['records']
statuses.each do |status|
- record = data_by_id[status['legacy_id']]
+ record = data_by_id[status['legacy_id'].to_i]
record['id'] = status['id']
record['name'] = status['name']
record['status'] = status['status']
if status['error']
puts "#{status['legacy_id']}: #{status['error']}"