Merge pull request #148 from Salamandar/patch-1

Fix get_default_values
This commit is contained in:
Alexandre Aubin 2024-01-06 17:09:10 +01:00 committed by GitHub
commit 3b76e5159a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,8 +35,8 @@ def get_default_values_for_questions(manifest, raise_if_no_default=True):
elif question["type"] == "password":
yield (name, "SomeSuperStrongPassword1234")
elif question.get("choices"):
if isinstance(question["choices"]):
choices = str(question["choices"])
if isinstance(question["choices"], list):
choices = question["choices"]
else:
choices = list(question["choices"].keys())
yield (name, choices[0])