Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
refactor(archive): remove redundant return when the archive is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
GOATS2K committed Apr 17, 2021
1 parent 3e35433 commit 3a15f1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions overpass/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,7 @@ def list_archived_streams() -> Text:
Text: Static page rendered by Flask.
"""
archive = get_archived_streams()
if archive:
return render_template("archive.html", archive=archive)
else:
return render_template("archive.html")
return render_template("archive.html", archive=archive)


@bp.route("/download/<unique_id>")
Expand Down
2 changes: 1 addition & 1 deletion overpass/templates/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block content %}
{% include "header.html" %}
<h5>Archive</h5>
{% if archive is defined %}
{% if archive is defined and archive|length %}
<table class="table table-borderless">
<thead>
<tr>
Expand Down

0 comments on commit 3a15f1e

Please sign in to comment.