Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apollo NoneType bug fix #1238

Merged
merged 14 commits into from
Sep 18, 2023
3 changes: 2 additions & 1 deletion superagi/tools/apollo/apollo_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _execute(self, person_titles: list[str], page: int = 1, per_page: int = 25,
num_of_employees, person_location, organization_domains)
logger.info(people_data)
people_list = []
if 'people' in people_data and len(people_data['people']) > 0:
if people_data and 'people' in people_data and len(people_data['people']) > 0:
for person in people_data['people']:
people_list.append({'first_name': person['first_name'],
'last_name': person['last_name'],
Expand Down Expand Up @@ -130,3 +130,4 @@ def apollo_search_results(self, page, per_page, person_titles, num_of_employees
return response.json()
else:
return None