mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 22:47:36 +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))
|
query = query.filter(Package.title.contains(search))
|
||||||
|
|
||||||
if shouldReturnJson():
|
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:
|
else:
|
||||||
tags = Tag.query.all()
|
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())
|
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