Fix app name definition

This commit is contained in:
Alexandre Aubin 2018-12-12 16:32:23 +00:00
parent 63499d6f0e
commit 86ca1285f2

View file

@ -36,13 +36,11 @@ class AppList(db.Model):
g = Github() g = Github()
raw_apps = json.loads(requests.get(self.url).text).values() raw_apps = json.loads(requests.get(self.url).text)
apps = [ app for app in raw_apps ]
for app in apps: for name, app in raw_apps.items():
app['url'] = app["git"]["url"].strip('/') app['url'] = app["git"]["url"].strip('/')
name = os.path.basename(app["url"]).replace("_ynh", "")
# Try to find an app for this name # Try to find an app for this name
known_app = App.query.filter_by(name=name).first() known_app = App.query.filter_by(name=name).first()