Skip to content

Commit

Permalink
#26 bugfix, different accounting_id still doesnt work
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Sep 16, 2019
1 parent 913c0e0 commit 07f71b8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/models/script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ def cores
28
end

def accounting_id
private

def present_accounting_id
# be sure to return nil and not just empty
@accounting_id.to_s.presence
accounting_id.to_s.presence
end
private

def clean_up(err, content)
errors.add(:name, :blank, message: err.inspect.to_s)
Expand Down Expand Up @@ -119,7 +120,7 @@ def job_opts
email_on_terminated: email,
job_array_request: job_array_request,
workdir: job_dir,
accounting_id: accounting_id
accounting_id: present_accounting_id
}
end
end

0 comments on commit 07f71b8

Please sign in to comment.