diff --git a/server/utils/nocodb.ts b/server/utils/nocodb.ts index da94ea6..fdbe115 100644 --- a/server/utils/nocodb.ts +++ b/server/utils/nocodb.ts @@ -67,6 +67,7 @@ export const updateInterest = async (id: string, data: Partial, retryC const cleanData: Record = {}; // Only include fields that are part of the InterestsRequest schema + // Removed webhook fields: "Request More Information", "Request More Info - To Sales", "EOI Send to Sales" const allowedFields = [ "Full Name", "Yacht Name", @@ -82,7 +83,6 @@ export const updateInterest = async (id: string, data: Partial, retryC "Width", "Depth", "Created At", - "Request More Information", "Source", "Place of Residence", "Contact Method Preferred", @@ -90,8 +90,6 @@ export const updateInterest = async (id: string, data: Partial, retryC "Berth Number", "EOI Time Sent", "Lead Category", - "Request More Info - To Sales", - "EOI Send to Sales", "Time LOI Sent", "EOI Status", "Berth Info Sent Status", @@ -108,7 +106,15 @@ export const updateInterest = async (id: string, data: Partial, retryC // Filter the data to only include allowed fields for (const field of allowedFields) { if (field in data) { - cleanData[field] = (data as any)[field]; + const value = (data as any)[field]; + + // Skip webhook-type fields and other object fields that shouldn't be sent + if (value && typeof value === 'object' && !Array.isArray(value)) { + console.log(`[nocodb.updateInterest] Skipping object field: ${field}`, value); + continue; + } + + cleanData[field] = value; } }