mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-05 13:52:38 +02:00
In some cases when trying to create tests, metagpt crashes.
Adding some more safeguard to handle the case where code_doc is None.
This commit is contained in:
parent
75cbf9f087
commit
03012a81fd
1 changed files with 2 additions and 0 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue