diff --git a/fanficfare/story.py b/fanficfare/story.py index 643de179..95bd761e 100644 --- a/fanficfare/story.py +++ b/fanficfare/story.py @@ -1083,7 +1083,9 @@ class Story(Configurable): chapter['title'] = chapter['chapter'] retval.append(chapter) else: - retval = self.chapters + # return a copy so chapters inside story can't be changed + # by code outside it. + retval = copy.deepcopy(self.chapters) return retval