Skip to content

Commit

Permalink
Check for path in job name before finalizing it.
Browse files Browse the repository at this point in the history
  • Loading branch information
euler-room committed Oct 21, 2024
1 parent c17b872 commit ddeae95
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ def submit(*)

# TODO: need to sanitize the job name for some schedulers
def job_name(name)
[
formatted_prefix = [
ENV['OOD_PORTAL'], # the OOD portal id
ENV['RAILS_RELATIVE_URL_ROOT'].to_s.sub(%r{^/[^/]+/}, ''), # the OOD app
'project-manager',
name # the user supplied job name
'project-manager'
].reject(&:blank?).join('/')
name.include?(formatted_prefix) ? name : "#{formatted_prefix}/#{name}"
end
end
end
Expand Down

0 comments on commit ddeae95

Please sign in to comment.