diff --git a/CHANGELOG.md b/CHANGELOG.md index 974ffbf..15dc87d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - URL parameter to points.json to allow returning only the JSON for a single team by its team id (e.g., points.json?id=abc123). ### Fixed +- Handle cases where non-legacy puzzles don't have an `author` attribute - Handle YAML-formatted file and script lists as expected - YAML-formatted example puzzle actually works as expected diff --git a/devel/moth.py b/devel/moth.py index dc61727..3f4374c 100644 --- a/devel/moth.py +++ b/devel/moth.py @@ -412,7 +412,12 @@ class Puzzle: self.body.write('') def get_authors(self): - return self.authors or [self.author] + if len(self.authors) > 0: + return self.authors + elif hasattr(self, "author"): + return [self.author] + else: + return [] def get_body(self): return self.body.getvalue()