Pick up softwareAgent from v2 manifests.

For issue #691.
This commit is contained in:
N-Pex 2025-10-15 17:20:00 +02:00
parent f701e2af15
commit 5bb6fddee0

View file

@ -251,7 +251,7 @@ const extractFlagValues = (flagPath: string, path: FlagMatchRulePathSegment[]):
if (keys.length == 1) {
return opart.map((s, i) => {
return { value: s, path: [{ object: o, path: key + "[" + i + "]"}, ... path] };
return { value: o, path: [{ object: s, path: key + "[" + i + "]"}, ... path] };
});
} else {
return opart.reduce((res: FlagMatchRuleValue[] | undefined, oin: any, i: number) => {
@ -314,7 +314,7 @@ const getFirstWithDataAsDate = (flagPaths: string[], path: FlagMatchRulePathSegm
const softwareAgentFromAction = (action: FlagMatchRuleValue): string | undefined => {
const agent = getFirstWithData([
"softwareAgent", "../../../claim_generator"
"softwareAgent/name", "softwareAgent", "../../../claim_generator"
], action.path);
return agent;
};