adding extra tests

This commit is contained in:
Joao Moura
2023-11-12 22:54:47 -03:00
parent e6f928abef
commit 4e984e9317
2 changed files with 27 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ class Crew(BaseModel):
if values.get('config'):
config = json.loads(values.get('config'))
if not config['agents'] or not config['tasks']:
if not config.get('agents') or not config.get('tasks'):
raise ValueError('Config should have agents and tasks.')
values['agents'] = [Agent(**agent) for agent in config['agents']]