Removed old commented code
This commit is contained in:
parent
6b1e0ebbfe
commit
da9b902c19
|
@ -68,8 +68,6 @@ class EmailService(object):
|
||||||
|
|
||||||
def get_rendered_content(self, message, data):
|
def get_rendered_content(self, message, data):
|
||||||
content = JinjaService.get_content(message, data)
|
content = JinjaService.get_content(message, data)
|
||||||
# template = Template(message)
|
|
||||||
# content = template.render(data)
|
|
||||||
rendered_markdown = markdown.markdown(content, extensions=['nl2br'])
|
rendered_markdown = markdown.markdown(content, extensions=['nl2br'])
|
||||||
content_html = self.get_cr_connect_wrapper(rendered_markdown)
|
content_html = self.get_cr_connect_wrapper(rendered_markdown)
|
||||||
|
|
||||||
|
|
|
@ -718,8 +718,6 @@ class WorkflowService(object):
|
||||||
"""Runs all the property values through the Jinja2 processor to inject data."""
|
"""Runs all the property values through the Jinja2 processor to inject data."""
|
||||||
for k, v in props.items():
|
for k, v in props.items():
|
||||||
try:
|
try:
|
||||||
# template = Template(v)
|
|
||||||
# props[k] = template.render(**spiff_task.data)
|
|
||||||
props[k] = JinjaService.get_content(v, spiff_task.data)
|
props[k] = JinjaService.get_content(v, spiff_task.data)
|
||||||
except jinja2.exceptions.TemplateError as ue:
|
except jinja2.exceptions.TemplateError as ue:
|
||||||
app.logger.error(f'Failed to process task property {str(ue)}', exc_info=True)
|
app.logger.error(f'Failed to process task property {str(ue)}', exc_info=True)
|
||||||
|
@ -744,10 +742,7 @@ class WorkflowService(object):
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# template = Template(raw_doc)
|
return JinjaService.get_content(raw_doc, spiff_task.data)
|
||||||
# return template.render(**spiff_task.data)
|
|
||||||
content = JinjaService.get_content(raw_doc, spiff_task.data)
|
|
||||||
# return content
|
|
||||||
except jinja2.exceptions.TemplateError as ue:
|
except jinja2.exceptions.TemplateError as ue:
|
||||||
raise ApiError.from_task(code="template_error", message="Error processing template for task %s: %s" %
|
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)
|
(spiff_task.task_spec.name, str(ue)), task=spiff_task)
|
||||||
|
@ -757,9 +752,6 @@ class WorkflowService(object):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
app.logger.error(str(e), exc_info=True)
|
app.logger.error(str(e), exc_info=True)
|
||||||
|
|
||||||
else:
|
|
||||||
return content
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def process_options(spiff_task, field):
|
def process_options(spiff_task, field):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue