|
|
@ -35,7 +35,7 @@ import { DataSource, Prisma, SymbolProfile } from '@prisma/client'; |
|
|
import { Big } from 'big.js'; |
|
|
import { Big } from 'big.js'; |
|
|
import { endOfToday, isAfter, isSameSecond, parseISO } from 'date-fns'; |
|
|
import { endOfToday, isAfter, isSameSecond, parseISO } from 'date-fns'; |
|
|
import { omit, uniqBy } from 'lodash'; |
|
|
import { omit, uniqBy } from 'lodash'; |
|
|
import { v4 as uuidv4 } from 'uuid'; |
|
|
import { randomUUID } from 'node:crypto'; |
|
|
|
|
|
|
|
|
import { ImportDataDto } from './import-data.dto'; |
|
|
import { ImportDataDto } from './import-data.dto'; |
|
|
|
|
|
|
|
|
@ -277,7 +277,7 @@ export class ImportService { |
|
|
|
|
|
|
|
|
// Asset profile belongs to a different user
|
|
|
// Asset profile belongs to a different user
|
|
|
if (existingAssetProfile) { |
|
|
if (existingAssetProfile) { |
|
|
const symbol = uuidv4(); |
|
|
const symbol = randomUUID(); |
|
|
assetProfileSymbolMapping[assetProfile.symbol] = symbol; |
|
|
assetProfileSymbolMapping[assetProfile.symbol] = symbol; |
|
|
assetProfile.symbol = symbol; |
|
|
assetProfile.symbol = symbol; |
|
|
} |
|
|
} |
|
|
@ -496,7 +496,7 @@ export class ImportService { |
|
|
accountId: validatedAccount?.id, |
|
|
accountId: validatedAccount?.id, |
|
|
accountUserId: undefined, |
|
|
accountUserId: undefined, |
|
|
createdAt: new Date(), |
|
|
createdAt: new Date(), |
|
|
id: uuidv4(), |
|
|
id: randomUUID(), |
|
|
isDraft: isAfter(date, endOfToday()), |
|
|
isDraft: isAfter(date, endOfToday()), |
|
|
SymbolProfile: { |
|
|
SymbolProfile: { |
|
|
assetClass, |
|
|
assetClass, |
|
|
|