fix(comm): handle null team field in lead creation
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -95,12 +95,12 @@ func (h *LeadHandler) CreateLead(w http.ResponseWriter, r *http.Request) {
|
||||
interest, product, urgency, customer_type, tags, status)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, COALESCE($8, 'normal'), $9, $10, 'new')
|
||||
RETURNING id, tenant_id, contact_id, conversation_id, source, status, interest, product,
|
||||
urgency, customer_type, owner, team, lead_score, qualification_complete,
|
||||
urgency, customer_type, owner, lead_score, qualification_complete,
|
||||
last_interaction_at, next_action_at, next_action_type, tags, created_at, updated_at
|
||||
`, tenantID, req.ContactID, nullUUID(req.ConversationID), req.Source, sourceMetadata,
|
||||
req.Interest, req.Product, req.Urgency, req.CustomerType, req.Tags).Scan(
|
||||
req.Interest, req.Product, req.Urgency, req.CustomerType, nullStringArray(req.Tags)).Scan(
|
||||
&lead.ID, &lead.TenantID, &lead.ContactID, &lead.ConversationID, &lead.Source, &lead.Status,
|
||||
&lead.Interest, &lead.Product, &lead.Urgency, &lead.CustomerType, &lead.Owner, &lead.Team,
|
||||
&lead.Interest, &lead.Product, &lead.Urgency, &lead.CustomerType, &lead.Owner,
|
||||
&lead.LeadScore, &lead.QualificationComplete, &lead.LastInteractionAt, &lead.NextActionAt,
|
||||
&lead.NextActionType, &lead.Tags, &lead.CreatedAt, &lead.UpdatedAt,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user