Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
Fixes missing cargo scan (broken since sqlalchemy chage)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudorandom committed Dec 27, 2012
1 parent 62ec593 commit 11007a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions cargoscanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
4 changes: 1 addition & 3 deletions templates/scan_results.html
Original file line number Diff line number Diff line change
@@ -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 %}
Expand Down Expand Up @@ -105,5 +104,4 @@ <h3>Errored Lines</h3>
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.