Skip to content

Commit

Permalink
Merge pull request #460 from leav-solutions/fix/XSTREAM-596-ranking
Browse files Browse the repository at this point in the history
fix(Record Domain): fix metadata undefined affectation
  • Loading branch information
Delmotte-Vincent authored Apr 25, 2024
2 parents ce437d2 + 8bf5e95 commit d24b41b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions apps/core/src/domain/record/recordDomain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ export default function ({
values = [
{
value:
attribute.type === AttributeTypes.SIMPLE_LINK && typeof record[attribute.id] === 'string'
? {id: record[attribute.id]}
: record[attribute.id]
attribute.type === AttributeTypes.SIMPLE_LINK && typeof record[attribute.id] === 'string'
? {id: record[attribute.id]}
: record[attribute.id]
}
];

Expand All @@ -240,7 +240,6 @@ export default function ({
library,
ctx
});

} else {
values = await valueDomain.getValues({
library,
Expand Down Expand Up @@ -1217,13 +1216,15 @@ export default function ({
ctx
});

formattedValue.metadata[metadataField] = await valueDomain.runActionsList({
const computedMetadata = await valueDomain.runActionsList({
listName: ActionsListEvents.GET_VALUE,
attribute: metadataAttributeProps,
library,
values: [formattedValue.metadata[metadataField] as IStandardValue],
ctx
})[0];
});

formattedValue.metadata[metadataField] = computedMetadata[0];
}
}

Expand Down

0 comments on commit d24b41b

Please sign in to comment.