Shreya 3 days ago
committed by GitHub
parent
commit
47bd61b9ea
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

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

Loading…
Cancel
Save