From a6b937b22867f4d5e969b317dbd94623745a425f Mon Sep 17 00:00:00 2001 From: Jeremy Zilar Date: Fri, 1 May 2026 11:56:34 -0400 Subject: [PATCH] Fall back to organization name in contact search results Org-only contacts (no personal name) were returning a null label in search results. Use c.name or c.organization so those contacts appear with their organization name instead of a blank title. --- api/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/search.py b/api/search.py index b1a6b36f..e3865d06 100644 --- a/api/search.py +++ b/api/search.py @@ -67,7 +67,7 @@ def _get_contact_results(session: Session, q: str, limit: int) -> list[dict]: contacts = session.scalars(query).all() results = [ { - "label": c.name, + "label": c.name or c.organization, "group": "Contacts", "properties": { "email": [e.email for e in c.emails],