diff --git a/cgfs.py b/cgfs.py index be504b2b..fa591931 100755 --- a/cgfs.py +++ b/cgfs.py @@ -1258,6 +1258,7 @@ def get_submission(self, path): try: submission.tld except AttributeError: + assert submission.children_loaded self.load_submission_files(submission) return submission @@ -1271,10 +1272,7 @@ def get_file(self, path, start=None, expect_type=None): continue try: - if not any( - not isinstance(f, SpecialFile) - for f in file.children.values() - ): + if not file.children_loaded: if file.type == DirTypes.ASSIGNMENT: self.load_submissions(file) elif file.type == DirTypes.SUBMISSION: