Skip to content

Commit f1e2e15

Browse files
surajitsurajit
authored andcommitted
modify requirements
1 parent 465e579 commit f1e2e15

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

hubspot_api/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@ def get_contact_by_email(email):
103103
contact = api_client.crm.contacts.search_api.do_search(request)
104104
if contact.results:
105105
contact_detail = contact.results[0]
106-
return {"id": contact_detail.id}
106+
contact_properties = contact_detail.properties
107+
return {"id": contact_detail.id,
108+
"email": contact_properties["email"],
109+
"firstname": contact_properties["firstname"],
110+
"lastname": contact_properties["lastname"],
111+
}
107112
else:
108113
return {}
109114
except contacts.exceptions.ApiException as e:

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ alembic==1.7.7
22
anyio==3.6.1
33
black==22.3.0
44
certifi==2021.10.8
5+
coverage==6.3.3
56
charset-normalizer==2.0.12
67
click==8.1.3
78
fastapi==0.78.0

0 commit comments

Comments
 (0)