costagent 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/costagent.rb +2 -2
- metadata +2 -2
data/lib/costagent.rb
CHANGED
@@ -153,7 +153,7 @@ class CostAgent
|
|
153
153
|
InvoiceItem.new(
|
154
154
|
:id => (item/"id").first.inner_text.to_i,
|
155
155
|
:invoice_id => (item/"invoice-id").first.inner_text.to_i,
|
156
|
-
:project_id => project.id,
|
156
|
+
:project_id => project.nil? ? nil : project.id,
|
157
157
|
:project => project,
|
158
158
|
:item_type => (item/"item-type").first.inner_text,
|
159
159
|
:description => (item/"description").first.inner_text,
|
@@ -164,7 +164,7 @@ class CostAgent
|
|
164
164
|
project = self.project((invoice/"project-id").first.inner_text.to_i)
|
165
165
|
Invoice.new(
|
166
166
|
:id => (invoice/"id").first.inner_text.to_i,
|
167
|
-
:project_id => project.id,
|
167
|
+
:project_id => project.nil? ? nil : project.id,
|
168
168
|
:project => project,
|
169
169
|
:description => (invoice/"description").first.inner_text,
|
170
170
|
:reference => (invoice/"reference").text,
|