lib/eco/api/session/batch/job.rb in eco-helpers-2.0.23 vs lib/eco/api/session/batch/job.rb in eco-helpers-2.0.24

- old
+ new

@@ -251,10 +251,16 @@ # 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 - full_queue.select {|entry| !excluded.call(entry, session, options, self)} + if options.dig(:include, :only_excluded) + 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)} + end end # Applies the changes introduced by api policies def apply_policies(pre_queue) people(pre_queue).tap do |entries|