Thomas Kaul
4 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
apps/api/src/app/import/import.service.ts
|
|
@ -167,9 +167,9 @@ export class ImportService { |
|
|
|
|
|
|
|
for (const account of accountsDto) { |
|
|
|
// Check if there is any existing account with the same ID
|
|
|
|
const accountWithSameId = existingAccounts.find( |
|
|
|
(existingAccount) => existingAccount.id === account.id |
|
|
|
); |
|
|
|
const accountWithSameId = existingAccounts.find((existingAccount) => { |
|
|
|
return existingAccount.id === account.id; |
|
|
|
}); |
|
|
|
|
|
|
|
// If there is no account or if the account belongs to a different user then create a new account
|
|
|
|
if (!accountWithSameId || accountWithSameId.userId !== user.id) { |
|
|
|