File tree 1 file changed +9
-3
lines changed
packages/loot-core/src/server/tools
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -125,14 +125,19 @@ async function fixSplitTransactions(): Promise<{
125
125
} ) ;
126
126
127
127
// 7. Clear categories of parent transactions
128
- const parentTransactionsWithCategory = await db . all < Pick < db . DbViewTransactionInternal , 'id' > > ( `
128
+ const parentTransactionsWithCategory = await db . all <
129
+ Pick < db . DbViewTransactionInternal , 'id' >
130
+ > ( `
129
131
SELECT id FROM transactions WHERE isParent = 1 AND category IS NOT NULL
130
132
` ) ;
131
133
132
134
console . log ( 'parentTransactionsWithCategory' , parentTransactionsWithCategory ) ;
133
135
134
136
await runMutator ( async ( ) => {
135
- const updated = parentTransactionsWithCategory . map ( ( { id } ) => ( { id, category : null } ) ) ;
137
+ const updated = parentTransactionsWithCategory . map ( ( { id } ) => ( {
138
+ id,
139
+ category : null ,
140
+ } ) ) ;
136
141
await batchUpdateTransactions ( { updated } ) ;
137
142
} ) ;
138
143
@@ -142,7 +147,8 @@ async function fixSplitTransactions(): Promise<{
142
147
numDeleted : deletedRows . length ,
143
148
numTransfersFixed : brokenTransfers . length ,
144
149
numNonParentErrorsFixed : errorRows . length ,
145
- numParentTransactionsWithCategoryFixed : parentTransactionsWithCategory . length ,
150
+ numParentTransactionsWithCategoryFixed :
151
+ parentTransactionsWithCategory . length ,
146
152
mismatchedSplits,
147
153
} ;
148
154
}
You can’t perform that action at this time.
0 commit comments