Merge pull request #765 from arnaudgelas/fix/crash

In some cases when trying to create tests, metagpt crashes.
This commit is contained in:
geekan 2024-01-18 19:22:56 +08:00 committed by GitHub
commit af018a84e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,6 +63,8 @@ class QaEngineer(Role):
if not filename or "test" in filename:
continue
code_doc = await src_file_repo.get(filename)
if not code_doc:
continue
test_doc = await tests_file_repo.get("test_" + code_doc.filename)
if not test_doc:
test_doc = Document(