Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes missing cargo scan (broken since sqlalchemy chage)

  • Loading branch information...
commit 11007a2415b3cdecc88d68884687a4ded1b0a3cf 1 parent 62ec593
@sudorandom sudorandom authored
Showing with 5 additions and 7 deletions.
  1. +4 −4 cargoscanner.py
  2. +1 −3 templates/scan_results.html
View
8 cargoscanner.py
@@ -511,11 +511,11 @@ def display_scan(scan_id):
status = 200
if scan_results:
scan_results['scan_id'] = scan_id
+ return render_template('scan_results.html', scan_results=scan_results,
+ error=error, from_igb=is_from_igb(), full_page=True), status
else:
- error = "Scan Not Found"
- status = 404
- return render_template('scan_results.html', scan_results=scan_results,
- error=error, from_igb=is_from_igb(), full_page=True), status
+ return render_template('index.html', error="Scan Not Found",
+ from_igb=is_from_igb(), full_page=True), 404
@app.route('/latest/', defaults={'limit': 20})
View
4 templates/scan_results.html
@@ -1,5 +1,4 @@
{% if full_page %}{% extends 'index.html' %}{% endif -%}
- {% if scan_results %}
{% block scan_results %}
<div>
<p>Scan Result {% if scan_results.scan_id %}#{{ scan_results.scan_id }} {% endif %}<small> {% if scan_results.created %}<small>created {{ scan_results.created|relative_time}}</small> {% endif %}
@@ -105,5 +104,4 @@
window.history.replaceState('Object', 'Title', '{{ url_for('display_scan', scan_id=scan_results.scan_id) }}');
{% endif %}
</script>
- {% endblock %}
- {% endif %}
+ {% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.