Browse Source

Merge b3e8918612 into b9832e8eff

pull/7796/merge
Shreya 5 days ago
committed by GitHub
parent
commit
d0288f537b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      apps/api/src/app/import/import.service.ts

5
apps/api/src/app/import/import.service.ts

@ -1063,8 +1063,9 @@ export class ImportService {
const isDuplicate = existingActivities.some((activity) => {
return (
(!accountId || activity.accountId === accountId) &&
(activity.comment || null) === (comment || null) &&
(activity.currency === currency ||
((activity.currency || null) === (currency || null) ||
activity.assetProfile.currency === currency) &&
activity.assetProfile.dataSource === dataSource &&
isSameSecond(activity.date, date) &&
@ -1074,7 +1075,7 @@ export class ImportService {
activity.type === type &&
activity.unitPrice === unitPrice
);
});
});
const error: ActivityError = isDuplicate
? { code: 'IS_DUPLICATE' }

Loading…
Cancel
Save