A local-first personal finance app
don't import deleted split lines ynab4 (#5226)
youngcwe3aa63d1fa25
diff --git a/packages/loot-core/src/server/importers/ynab4.ts b/packages/loot-core/src/server/importers/ynab4.tsindex a11285d846..b3f98d8904 100644--- a/packages/loot-core/src/server/importers/ynab4.ts+++ b/packages/loot-core/src/server/importers/ynab4.ts@@ -218,15 +218,17 @@ async function importTransactions(subtransactions:transaction.subTransactions &&- transaction.subTransactions.map(t => {- return {- id: entityIdMap.get(t.entityId),- amount: amountToInteger(t.amount),- category: getCategory(t.categoryId),- notes: t.memo || null,- ...transferProperties(t),- };- }),+ transaction.subTransactions+ .filter(st => !st.isTombstone)+ .map(t => {+ return {+ id: entityIdMap.get(t.entityId),+ amount: amountToInteger(t.amount),+ category: getCategory(t.categoryId),+ notes: t.memo || null,+ ...transferProperties(t),+ };+ }),};return newTransaction;diff --git a/upcoming-release-notes/5226.md b/upcoming-release-notes/5226.mdnew file mode 100644index 0000000000..917977217e--- /dev/null+++ b/upcoming-release-notes/5226.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [youngcw]+---++Fix YNAB4 split transaction import