forked from sagnik/Velocity-OS
fix: align pipeline cards with client 360 ids
This commit is contained in:
@@ -454,13 +454,18 @@ def _relative_time_label(value: Any) -> str:
|
||||
|
||||
|
||||
def _kanban_stage_payload(stage_id: str, label: str, emoji: str, leads: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
def lead_route_id(lead: dict[str, Any]) -> str:
|
||||
metadata = lead.get("metadata") or {}
|
||||
return str(metadata.get("canonical_person_id") or lead["id"])
|
||||
|
||||
return {
|
||||
"id": stage_id,
|
||||
"label": label,
|
||||
"emoji": emoji,
|
||||
"leads": [
|
||||
{
|
||||
"id": lead["id"],
|
||||
"id": lead_route_id(lead),
|
||||
"legacyId": lead["id"],
|
||||
"name": lead["name"],
|
||||
"location": lead.get("unit_interest") or lead.get("budget") or lead.get("source"),
|
||||
"qdScore": int(lead.get("score") or 0),
|
||||
|
||||
Reference in New Issue
Block a user