remote job submission: don't error out if no templates specified

This commit is contained in:
David Anderson 2017-01-27 11:43:52 -08:00
parent f8e19d61f5
commit e93e436b5a
1 changed files with 6 additions and 2 deletions

View File

@ -311,8 +311,12 @@ function xml_get_jobs($r) {
$job->target_host = (int)$j->target_host;
$job->name = (string)$j->name;
$job->rsc_fpops_est = (double)$j->rsc_fpops_est;
$job->wu_template = $j->wu_template->input_template->asXML();
$job->result_template = $j->result_template->output_template->asXML();
if ($j->wu_template) {
$job->wu_template = $j->wu_template->input_template->asXML();
}
if ($j->result_template) {
$job->result_template = $j->result_template->output_template->asXML();
}
foreach ($j->input_file as $f) {
$file = new StdClass;
$file->mode = (string)$f->mode;