lib/eco/api/usecases/default_cases/create_case.rb in eco-helpers-0.6.17 vs lib/eco/api/usecases/default_cases/create_case.rb in eco-helpers-0.7.1

- old
+ new

@@ -6,13 +6,14 @@ def process @cases.define("create", type: :sync) do |entries, people, session, options| creation = session.job_group("main").new("create", type: :create, sets: [:core, :details, :account]) + strict_search = session.config.people.strict_search? || options.dig(:search, :strict) pgs = session.policy_groups entries.each.with_index do |entry, i| - if person = people.find(entry) + if person = people.find(entry, strict: strict_search) session.logger.error("Entry(#{i}) - this person (id: '#{person.id}') already exists: #{entry.to_s(:identify)}") else person = session.new_person core_excluded = ["supervisor_id"] entry.set_core(person, exclude: core_excluded)