Skip to content

Commit 34e2965

Browse files
committed
Fix bug where boolean values would not be set on the local record
1 parent 01253df commit 34e2965

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/netsuite_rails/record_sync.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def netsuite_extract_from_record(netsuite_record)
200200
netsuite_record.send(netsuite_field)
201201
end
202202

203-
if field_value.blank?
203+
if field_value.nil?
204204
# TODO possibly nil out the local value?
205205
next
206206
end
@@ -218,7 +218,7 @@ def netsuite_extract_from_record(netsuite_record)
218218

219219
# TODO should we just check for nil? vs present?
220220

221-
if field_hints.has_key?(local_field) && field_value.present?
221+
if field_hints.has_key?(local_field) && !field_value.nil?
222222
field_value = NetSuiteRails::Transformations.transform(field_hints[local_field], field_value, :pull)
223223
end
224224

0 commit comments

Comments
 (0)