From e93e436b5aff9130baa920674e62a4e4c64d4f00 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 27 Jan 2017 11:43:52 -0800 Subject: [PATCH] remote job submission: don't error out if no templates specified --- html/user/submit_rpc_handler.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php index 1fe11da336..09b5281a8c 100644 --- a/html/user/submit_rpc_handler.php +++ b/html/user/submit_rpc_handler.php @@ -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;