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:
@@ -139,9 +139,10 @@ class Customer < ActiveRecord::Base
|
|||||||
# Push the updates
|
# Push the updates
|
||||||
def push
|
def push
|
||||||
begin
|
begin
|
||||||
|
tries ||= 3
|
||||||
get_base.update(@details)
|
get_base.update(@details)
|
||||||
rescue
|
rescue
|
||||||
return nil
|
retry unless (tries -= 1).zero?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -157,9 +158,10 @@ class Customer < ActiveRecord::Base
|
|||||||
# init details
|
# init details
|
||||||
def get_details
|
def get_details
|
||||||
begin
|
begin
|
||||||
|
tries ||= 3
|
||||||
@details = get_customer(self.id)
|
@details = get_customer(self.id)
|
||||||
rescue
|
rescue
|
||||||
return nil
|
retry unless (tries -= 1).zero?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user