KamoCRM

Promote base mortgage-market leads to LeadClaimMortgage on save so mortgage fields persist

Fixkamo-shared-library
Shipped
9 ஜூலை, 2026 அன்று 11:18 PM UTC
Author
Kamo
Commit
dfa0ef2

A lead whose market sub-type is (residential/commercial) mortgage was stored as a base Lead unless the backend salesType itself equaled the mortgage type, so updateLead's 'instanceof LeadClaimMortgage' guard silently dropped every mortgage field (and getLead returned no mortgageFields → empty header KPIs). Promote in-place via the JOINED-inheritance subtype-row insert (ON CONFLICT DO NOTHING for concurrency) then reload.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing