Permalink
Browse files

Fixes missing cargo scan (broken since sqlalchemy chage)

  • Loading branch information...
1 parent 62ec593 commit 11007a2415b3cdecc88d68884687a4ded1b0a3cf @sudorandom sudorandom committed Dec 27, 2012
Showing with 5 additions and 7 deletions.
  1. +4 −4 cargoscanner.py
  2. +1 −3 templates/scan_results.html
View
@@ -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})
@@ -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 %}

0 comments on commit 11007a2

Please sign in to comment.