diff --git a/CRISPRessoReport.py b/CRISPRessoReport.py index e6616ae1..d50e1dff 100644 --- a/CRISPRessoReport.py +++ b/CRISPRessoReport.py @@ -159,6 +159,7 @@ def make_report(run_data, crispresso_report_file, crispresso_folder, _ROOT): crispresso_data_path += "/" report_data = { + 'guardrails': [] if 'guardrails' not in run_data['results'].keys() else run_data['results']['guardrails'], 'amplicons': data['amplicons'], 'figures': data['figures'], 'run_data': run_data, diff --git a/templates/report.html b/templates/report.html index 8402f81f..e0ff4e74 100644 --- a/templates/report.html +++ b/templates/report.html @@ -86,12 +86,10 @@ {% if report_data['report_display_name'] != '' %}
{{report_data['report_display_name']}}
{% endif %} - {% if 'guardrails' in report_data %} - {% if report_data['guardrails']|length > 0 %} - {% for message in report_data['guardrails'] %} - {{message}} - {% endfor %} - {% endif %} + {% if 'guardrails' in report_data and report_data['guardrails']|length > 0 %} + {% for message in report_data['guardrails'] %} + {{message}} + {% endfor %} {% endif %}
CRISPResso2 run information