Skip to content

Commit 85e626e

Browse files
authored
Merge pull request #669 from DataIntegrationGroup/BDMS-786-Company-Contact-Names
Fall back to organization name for org-only contacts in search
2 parents ce1e533 + a6b937b commit 85e626e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _get_contact_results(session: Session, q: str, limit: int) -> list[dict]:
6767
contacts = session.scalars(query).all()
6868
results = [
6969
{
70-
"label": c.name,
70+
"label": c.name or c.organization,
7171
"group": "Contacts",
7272
"properties": {
7373
"email": [e.email for e in c.emails],

0 commit comments

Comments
 (0)