Skip to content

Commit

Permalink
[backend] Fix CSV mapper creation if name exists (#9962)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archidoit authored Feb 14, 2025
1 parent a5260ae commit dccc851
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { v4 as uuidv4 } from 'uuid';
import type { ModuleDefinition } from '../../../schema/module';
import { registerDefinition } from '../../../schema/module';
import type { StixCsvMapper, StoreEntityCsvMapper } from './csvMapper-types';
import { ENTITY_TYPE_CSV_MAPPER } from './csvMapper-types';
import { ABSTRACT_INTERNAL_OBJECT } from '../../../schema/general';
import { NAME_FIELD, normalizeName } from '../../../schema/identifier';
import { normalizeName } from '../../../schema/identifier';
import convertCsvMapperToStix from './csvMapper-converter';
import './deprecated/csvMapper-deprecated';

Expand All @@ -16,7 +17,7 @@ const CSV_MAPPER_DEFINITION: ModuleDefinition<StoreEntityCsvMapper, StixCsvMappe
},
identifier: {
definition: {
[ENTITY_TYPE_CSV_MAPPER]: [{ src: NAME_FIELD }]
[ENTITY_TYPE_CSV_MAPPER]: () => uuidv4()
},
resolvers: {
name(data: object) {
Expand Down

0 comments on commit dccc851

Please sign in to comment.