Merge pull request #100 from dirtbags/99-fix-issues-with-multiple-answers

Fixing issue with multiple fields in YAML file
This commit is contained in:
int00h5525 2019-11-18 11:42:19 -06:00 committed by GitHub
commit f33fc9b005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Issue with multiple answers in devel server and YAML-format .moth
## [3.4.1] - 2019-11-17
### Fixed

View File

@ -249,6 +249,10 @@ class Puzzle:
self.success.mastery = val
elif key == "solution":
self.solution = val
elif key == "ksas":
if not isinstance(val, list):
raise ValueError("KSAs must be a list, got %s, instead" & (type(val),))
self.ksas = val
elif key == "ksa":
self.ksas.append(val)
else: