mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Update customer.rb
This commit is contained in:
@@ -139,9 +139,10 @@ class Customer < ActiveRecord::Base
|
||||
# Push the updates
|
||||
def push
|
||||
begin
|
||||
tries ||= 3
|
||||
get_base.update(@details)
|
||||
rescue
|
||||
return nil
|
||||
retry unless (tries -= 1).zero?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -157,9 +158,10 @@ class Customer < ActiveRecord::Base
|
||||
# init details
|
||||
def get_details
|
||||
begin
|
||||
tries ||= 3
|
||||
@details = get_customer(self.id)
|
||||
rescue
|
||||
return nil
|
||||
retry unless (tries -= 1).zero?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user