-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recently, we changed in Banks from BankTransaction.updateAll() to client.saveAll(). But we had errors in our log saying that we were calling collection without a doctype (CozyStackClient.collection() called without a doctype) In fact, this is because saveAll need to read the _type for the documents to update them cf: https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/StackLink.js#L122 Sometime it worked for Banks sometime not. It was due to the fact that we have a condition here: https://github.com/cozy/cozy-banks/blob/master/src/targets/services/helpers/helpers.js#L19-L45 The fix, is to normalize the document returned by fetchChanges() like that we add _type & id automatically. We have a fetchChangesRaw() to get the real changes without any edition.
- Loading branch information
Showing
2 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters