Merge branch 'rrt/staging' into rrt/production
This commit is contained in:
commit
a77b168e30
|
@ -157,7 +157,7 @@ class WorkflowService(object):
|
|||
LookupDataModel.lookup_file_model == lookup_model).limit(10).all()
|
||||
options = []
|
||||
for d in data:
|
||||
options.append({"id": d.value, "name": d.label})
|
||||
options.append({"id": d.value, "label": d.label})
|
||||
return random.choice(options)
|
||||
else:
|
||||
raise ApiError.from_task("invalid_autocomplete", "The settings for this auto complete field "
|
||||
|
@ -294,11 +294,11 @@ class WorkflowService(object):
|
|||
template = Template(raw_doc)
|
||||
return template.render(**spiff_task.data)
|
||||
except jinja2.exceptions.TemplateError as ue:
|
||||
raise ApiError(code="template_error", message="Error processing template for task %s: %s" %
|
||||
(spiff_task.task_spec.name, str(ue)), status_code=500)
|
||||
raise ApiError.from_task(code="template_error", message="Error processing template for task %s: %s" %
|
||||
(spiff_task.task_spec.name, str(ue)), task=spiff_task)
|
||||
except TypeError as te:
|
||||
raise ApiError(code="template_error", message="Error processing template for task %s: %s" %
|
||||
(spiff_task.task_spec.name, str(te)), status_code=500)
|
||||
raise ApiError.from_task(code="template_error", message="Error processing template for task %s: %s" %
|
||||
(spiff_task.task_spec.name, str(te)), task=spiff_task)
|
||||
# TODO: Catch additional errors and report back.
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Reference in New Issue