Skip to content

Commit

Permalink
fix(service-metadata): use atomic ope instead
Browse files Browse the repository at this point in the history
  • Loading branch information
AlitaBernachot committed Jan 20, 2025
1 parent ac24d68 commit e5ab1ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,11 @@ export class Gn4FieldMapper {
output
),
resourceType: (output, source) => {
const resourceType = selectField(source, 'resourceType')
const kind = resourceType[0] === 'service' ? 'service' : 'dataset'
const resourceType = selectField(
getFirstValue(selectField(source, 'resourceType')),
'key'
)
const kind = resourceType === 'service' ? 'service' : 'dataset'
return {
...output,
kind,
Expand Down

0 comments on commit e5ab1ed

Please sign in to comment.