mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Fixed bug
This commit is contained in:
@@ -28,7 +28,11 @@ class Vehicle < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def style
|
def style
|
||||||
return @details['years'][0]['styles'][0]['name'] if @details
|
begin
|
||||||
|
return @details['years'][0]['styles'][0]['name'] if @details
|
||||||
|
rescue
|
||||||
|
return nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def drive
|
def drive
|
||||||
@@ -53,6 +57,7 @@ class Vehicle < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def decode_vin
|
def decode_vin
|
||||||
|
get_details
|
||||||
if self.vin?
|
if self.vin?
|
||||||
details
|
details
|
||||||
self.year = @details['years'][0]['year']
|
self.year = @details['years'][0]['year']
|
||||||
|
|||||||
Reference in New Issue
Block a user