Fix maintainer dashboard, dataformat changed now that we're using the v3 catalog

This commit is contained in:
Alexandre Aubin 2023-06-11 15:03:05 +02:00
parent e6edec84db
commit 306d1aff78

View file

@ -36,16 +36,7 @@ class AppCatalog():
known_app.repo = app["url"]
print("Updating already known app {}".format(name))
maintainers_info = app["manifest"].get("maintainer", app["manifest"].get("developer", None))
if maintainers_info is None:
known_app.maintainers = [ ]
if isinstance(maintainers_info, dict):
if maintainers_info["name"] == "-" or maintainers_info["name"] == "":
known_app.maintainers = [ ]
else:
known_app.maintainers = re.split(", | et ", maintainers_info["name"])
if isinstance(maintainers_info, list):
known_app.maintainers = [ maintainer["name"] for maintainer in maintainers_info ]
known_app.maintainers = app["manifest"].get("maintainers", [])
known_app.maintained = 'package-not-maintained' not in app.get('antifeatures', [])
known_app.state = app["state"]