1
0
Fork 0

Fix my previous commit /o\

This commit is contained in:
Alexandre Aubin 2022-08-03 21:31:17 +02:00
parent a88e5eef3e
commit 549724942d
2 changed files with 14 additions and 4 deletions

View file

@ -37,8 +37,13 @@ def _convert_v1_manifest_to_v2(app_path):
"ram.runtime": "50M" "ram.runtime": "50M"
} }
maintainer = manifest.get("maintainer", {}).get("name") maintainers = manifest.get("maintainer", {})
manifest["maintainers"] = [maintainer] if maintainer else [] if isinstance(maintainers, list):
maintainers = [m['name'] for m in maintainers]
else:
maintainers = [maintainers["name"]] if maintainers.get("name") else []
manifest["maintainers"] = maintainers
install_questions = manifest["arguments"]["install"] install_questions = manifest["arguments"]["install"]
manifest["install"] = {} manifest["install"] = {}

View file

@ -24,8 +24,13 @@ def convert_v1_manifest_to_v2_for_catalog(manifest):
"ram": {"build": "50M", "runtime": "10M"} "ram": {"build": "50M", "runtime": "10M"}
} }
maintainer = manifest.get("maintainer", {}).get("name") maintainers = manifest.get("maintainer", {})
manifest["maintainers"] = [maintainer] if maintainer else [] if isinstance(maintainers, list):
maintainers = [m['name'] for m in maintainers]
else:
maintainers = [maintainers["name"]] if maintainers.get("name") else []
manifest["maintainers"] = maintainers
install_questions = manifest["arguments"]["install"] install_questions = manifest["arguments"]["install"]