mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 09:24:23 -05:00
Update customer.rb
This commit is contained in:
@@ -107,14 +107,15 @@ class Customer < ActiveRecord::Base
|
|||||||
|
|
||||||
# init details
|
# init details
|
||||||
def get_details
|
def get_details
|
||||||
|
Thread.new {
|
||||||
if self.id
|
if self.id
|
||||||
@details = get_customer(self.id)
|
@details = get_customer(self.id)
|
||||||
end
|
end
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
# update's the customers name if updated
|
# update's the customers name if updated
|
||||||
def update
|
def update
|
||||||
Thread.new {
|
|
||||||
begin
|
begin
|
||||||
if not self.name == @detils.display_name
|
if not self.name == @detils.display_name
|
||||||
self.name = @details.display_name
|
self.name = @details.display_name
|
||||||
@@ -123,7 +124,6 @@ class Customer < ActiveRecord::Base
|
|||||||
rescue
|
rescue
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user