Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
99003a50a7
commit
e1b34ef754
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user