mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 01:00:44 -04:00
Update customer.rb
This commit is contained in:
1 parent
fbcc3eba9d
commit
181da3fef1
1 file changed
+2
-2
@@ -111,8 +111,8 @@ class Customer < ActiveRecord::Base
|
|||||||
|
|
||||||
without_callback(:save, :before, :save) do
|
without_callback(:save, :before, :save) do
|
||||||
#Qbo.get_base(:customer).service.query_in_batches(query, per_page: 100) do |batch|
|
#Qbo.get_base(:customer).service.query_in_batches(query, per_page: 100) do |batch|
|
||||||
Qbo.get_base(:customer).service.query(query)
|
Qbo.get_base(:customer).service.query(query) do |customer|
|
||||||
batch.each do |customer|
|
#batch.each do |customer|
|
||||||
Customer.transaction do
|
Customer.transaction do
|
||||||
# Update the customer table
|
# Update the customer table
|
||||||
qbo_customer = Customer.find_or_create_by(id: customer.id)
|
qbo_customer = Customer.find_or_create_by(id: customer.id)
|
||||||
|
|||||||
Reference in new issue
Block a user