Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-19 18:07:08 +00:00
co-authored by renee-png
parent 8d8698def8
commit c0d3c74c04
+5
View File
@@ -284,6 +284,11 @@ const IMPORTERS: ImporterConfig[] = [
// in batched upserts where Postgrest sends the column union.
r.status = "intake";
}
// Default opened_at to today when missing — avoids NULL violations
// in batched upserts where Postgrest sends the column union.
if (!r.opened_at) {
r.opened_at = new Date().toISOString().slice(0, 10);
}
// Normalise billing method
if (r.billing_method) {
const bm = String(r.billing_method).toLowerCase();