mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Remove packages with no approved releases from JSON
This commit is contained in:
parent
a6ccb75ffd
commit
1ecc3db383
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user