mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update customer.rb
This commit is contained in:
@@ -111,10 +111,12 @@ class Customer < ActiveRecord::Base
|
|||||||
|
|
||||||
customers = Qbo.get_base(:customer).service.query_in_batches(query, per_page: 100) do |batch|
|
customers = Qbo.get_base(:customer).service.query_in_batches(query, per_page: 100) do |batch|
|
||||||
batch.each do |customer|
|
batch.each do |customer|
|
||||||
# Update the customer table
|
without_callback(:save, :before, :save) do
|
||||||
qbo_customer = Customer.find_or_create_by(id: customer.id)
|
# Update the customer table
|
||||||
qbo_customer.update_column(:name, customer.display_name)
|
qbo_customer = Customer.find_or_create_by(id: customer.id)
|
||||||
qbo_customer.update_column(:id, customer.id)
|
qbo_customer.name = customer.display_name
|
||||||
|
qbo_customer.id = customer.id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user