Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-19 00:34:13 +00:00
co-authored by renee-png
parent 99003a50a7
commit e1b34ef754
+2 -2
View File
@@ -746,10 +746,10 @@ function ImportPage() {
const withConflict = chunk.filter((r) => r[cfg.conflict]);
const withoutConflict = chunk.filter((r) => !r[cfg.conflict]);
if (cfg.table === "time_entries" && withConflict.length > 0) {
if ((cfg.table === "time_entries" || cfg.table === "invoices") && withConflict.length > 0) {
const externalIds = withConflict.map((r) => String(r[cfg.conflict]));
const { data: existing, error: lookupError } = await supabase
.from("time_entries")
.from(cfg.table as any)
.select("id, external_id")
.in("external_id", externalIds);