From 3fbc5f7751ad09243ce6b15a2d04ce5c2fb664a0 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 13 Jul 2020 02:02:12 +0100 Subject: [PATCH] Filter out packages with no releases in ContentDB --- app/blueprints/api/endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/blueprints/api/endpoints.py b/app/blueprints/api/endpoints.py index 5aa4dd70..87294aa4 100644 --- a/app/blueprints/api/endpoints.py +++ b/app/blueprints/api/endpoints.py @@ -34,7 +34,7 @@ def packages(): pkgs = [package.getAsDictionaryShort(current_app.config["BASE_URL"], version=ver) \ for package in query.all()] - return jsonify(pkgs) + return jsonify([package for package in pkgs if package.get("release")]) @bp.route("/api/scores/")