Closed simon04 closed 4 years ago
Specifying simplifyOptions: {keepHashes: false}
and applying the following function to the references gives as useful result:
function flattenReferences(statement) {
return statement.references.map(reference =>
Object.keys(reference).reduce((obj, property) => {
obj[property] = reference[property][0];
return obj;
}, {})
);
could you retry with the freshly published v7.4.1
? it now tries to minimize the template by all possible means, removing the snaks
wrapper object among others
Running
wd generate-template Q40 -p claims.P1082
generates an object without simplifying thereferences
. Thus,wd create-item
fails withinvalid property [ 'snaks' ]
when trying to re-use references.Fragment of the
generate-template
output:wd --version
= 7.3.0Test case catching this problem: