lib/eco/api/session/batch/job.rb in eco-helpers-2.0.40 vs lib/eco/api/session/batch/job.rb in eco-helpers-2.0.41
- old
+ new
@@ -341,10 +341,11 @@
# Keep a copy of the requests for future reference
def backup_update(requests, simulate: false)
dry_run = simulate ? "_dry_run" : ""
dir = config.people.requests_folder
- file = File.join(dir, "#{type}_data#{dry_run}.json")
+ filename = name.split(" ").join("-").gsub(/[=\\\/><,"-]+/,"_")
+ file = File.join(dir, "#{type}_data_#{filename}#{dry_run}.json")
file_manager.save_json(requests, file, :timestamp)
end
# Adds a job tied to the current job
# Used with error handlers that need their own job to run