konnectors/libs

Since linkBankOperations does not works in saveBills

Closed this issue · 1 comments

In https://github.com/cozy/cozy-konnector-libs/blob/master/libs/saveBills.js#L41 , originalEntries do not have an _id attribute and then the operation link does not work and gives "bill has no id, impossible to add it to an operation" for the matching operations.

I have made the assumption that the entries we get in linkBill should be the same objects as in originalEntries, maybe we lose the reference in https://github.com/cozy/cozy-konnector-libs/blob/master/libs/addData.js#L13. One possible solution would be to add .then(() => return entry) there to keep the original entry object. Can you try ?