From dc88a4a340a3a39bfeb641dbeac6ca7f87720860 Mon Sep 17 00:00:00 2001 From: David Massad Date: Thu, 27 Apr 2017 18:53:13 -0500 Subject: [PATCH] Fixed issue #59: Nils being inserted into updates that don't have them. --- lib/salesforce_bulk_api/job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/salesforce_bulk_api/job.rb b/lib/salesforce_bulk_api/job.rb index 2b637c7..41e2c52 100644 --- a/lib/salesforce_bulk_api/job.rb +++ b/lib/salesforce_bulk_api/job.rb @@ -124,7 +124,7 @@ def create_sobject(keys, r) sobject_xml += r[k].to_s end sobject_xml += "" - elsif @send_nulls && !@no_null_list.include?(k) + elsif @send_nulls && !@no_null_list.include?(k) && r.key?(k) sobject_xml += "<#{k} xsi:nil=\"true\"/>" end end