Commit ab87c1c3 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Don't show empty protocol content

parent cdbc3061
......@@ -532,7 +532,9 @@ def show_protocol(protocol):
content_html = (protocol.content_html_private
if protocol.has_private_view_right(user)
else protocol.content_html_public)
return render_template("protocol-show.html", protocol=protocol, errors_table=errors_table, documents_table=documents_table, document_upload_form=document_upload_form, source_upload_form=source_upload_form, time_diff=time_diff, large_time_diff=large_time_diff, content_html=Markup(content_html))
if content_html is not None:
content_html = Markup(content_html)
return render_template("protocol-show.html", protocol=protocol, errors_table=errors_table, documents_table=documents_table, document_upload_form=document_upload_form, source_upload_form=source_upload_form, time_diff=time_diff, large_time_diff=large_time_diff, content_html=content_html)
@app.route("/protocol/delete/<int:protocol_id>")
@login_required
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment