From 86ca1285f2cab78d7e5924e4dab8ccbdc7524728 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 12 Dec 2018 16:32:23 +0000 Subject: [PATCH] Fix app name definition --- app/models/applists.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/applists.py b/app/models/applists.py index d9b1634..b40c237 100644 --- a/app/models/applists.py +++ b/app/models/applists.py @@ -36,13 +36,11 @@ class AppList(db.Model): g = Github() - raw_apps = json.loads(requests.get(self.url).text).values() - apps = [ app for app in raw_apps ] + raw_apps = json.loads(requests.get(self.url).text) - for app in apps: + for name, app in raw_apps.items(): app['url'] = app["git"]["url"].strip('/') - name = os.path.basename(app["url"]).replace("_ynh", "") # Try to find an app for this name known_app = App.query.filter_by(name=name).first()