lib/eco/api/session/batch/job.rb in eco-helpers-2.0.30 vs lib/eco/api/session/batch/job.rb in eco-helpers-2.0.31
- old
+ new
@@ -251,10 +251,11 @@
# and the current batch is not a creation batch
# - filter out excluded entries from the api update
def api_included(full_queue)
return full_queue if type == :create
return full_queue unless excluded = session.config.people.api_excluded
- if options.dig(:include, :excluded, :only)
+ excluded = options.dig(:include, :excluded)
+ if excluded.is_a?(Hash) && excluded[:only]
full_queue.select {|entry| excluded.call(entry, session, options, self)}
elsif options.dig(:include, :excluded)
full_queue
else
full_queue.select {|entry| !excluded.call(entry, session, options, self)}