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

Fixkamo-shared-library
Shipped
July 9, 2026 at 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?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing