diff --git a/crm/api/whatsapp.py b/crm/api/whatsapp.py index 2a6c698c..3e3889be 100644 --- a/crm/api/whatsapp.py +++ b/crm/api/whatsapp.py @@ -335,5 +335,5 @@ def get_from_name(message): else: from_name = doc.get("lead_name") else: - from_name = doc.get("first_name") + " " + doc.get("last_name") + from_name = " ".join(filter(None, [doc.get("first_name"), doc.get("last_name")])) return from_name