diff --git a/lib/sf/account.rb b/lib/sf/account.rb index 4c94abb..b0f01dc 100644 --- a/lib/sf/account.rb +++ b/lib/sf/account.rb @@ -100,8 +100,12 @@ def self.inc_parts_to_be def self.inc_certs_to_be acct_ids = Sf::Opportunity.cert_subscribers(Date.today.prev_month(2)).map(&:AccountId) - accts_str = acct_ids.map{|v| "\'#{v}\'"}.join(', ') - build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where InCommon_Participant__c = true and Id in (#{accts_str})") + if acct_ids.empty? + [] + else + accts_str = acct_ids.map{|v| "\'#{v}\'"}.join(', ') + build_collection Sf.client.query("select #{FIELDS_SELECT_STR} from Account where InCommon_Participant__c = true and Id in (#{accts_str})") + end end def self.active_inc_parts(service_name) diff --git a/lib/sf/version.rb b/lib/sf/version.rb index 19006a4..c9b0267 100644 --- a/lib/sf/version.rb +++ b/lib/sf/version.rb @@ -1,3 +1,3 @@ module Sf - VERSION = "0.1.34" + VERSION = "0.1.35" end