aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/packages.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/packages.py b/app/views/packages.py
index 8165c15..6428339 100644
--- a/app/views/packages.py
+++ b/app/views/packages.py
@@ -28,7 +28,9 @@ def doPackageList(type):
query = query.filter(Package.title.contains(search))
if shouldReturnJson():
- return jsonify([package.getAsDictionary(app.config["BASE_URL"]) for package in query.all()])
+ pkgs = [package.getAsDictionary(app.config["BASE_URL"]) \
+ for package in query.all() if package.getDownloadRelease() is not None]
+ return jsonify(pkgs)
else:
tags = Tag.query.all()
return render_template("packages/list.html", title=title, packages=query.all(), query=search, tags=tags, type=None if type is None else type.toName())