Skip to content

Commit

Permalink
fix: Misspelled checkedAttributes -> checkAttributes for bank objects
Browse files Browse the repository at this point in the history
Because of this, all fetched transaction where always updated on stack
which caused a large overhead for each banking connector execution
  • Loading branch information
doubleface authored and doubleface committed Mar 21, 2024
1 parent cc3e998 commit 68ffa1d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/cozy-doctypes/src/Document.js
Expand Up @@ -228,7 +228,7 @@ class Document {
} else {
log(
'debug',
`[updateIfDifferent] No need to update ${update._id} because its \`checkedAttributes\` (${this.checkAttributes}) didn't change.`
`[updateIfDifferent] No need to update ${update._id} because its \`checkAttributes\` (${this.checkAttributes}) didn't change.`
)
return doc
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cozy-doctypes/src/banking/BalanceHistory.js
Expand Up @@ -39,6 +39,6 @@ class BalanceHistory extends Document {
BalanceHistory.doctype = 'io.cozy.bank.balancehistories'
BalanceHistory.idAttributes = ['year', 'relationships.account.data._id']
BalanceHistory.version = 1
BalanceHistory.checkedAttributes = ['balances']
BalanceHistory.checkAttributes = ['balances']

module.exports = BalanceHistory
2 changes: 1 addition & 1 deletion packages/cozy-doctypes/src/banking/BankAccount.js
Expand Up @@ -175,7 +175,7 @@ BankAccount.normalizeAccountNumber = matching.normalizeAccountNumber
BankAccount.doctype = 'io.cozy.bank.accounts'
BankAccount.idAttributes = ['_id']
BankAccount.version = 1
BankAccount.checkedAttributes = null
BankAccount.checkAttributes = null
BankAccount.vendorIdAttr = 'vendorId'

module.exports = BankAccount
2 changes: 1 addition & 1 deletion packages/cozy-doctypes/src/banking/BankAccountStats.js
Expand Up @@ -49,6 +49,6 @@ class BankAccountStats extends Document {
BankAccountStats.doctype = 'io.cozy.bank.accounts.stats'
BankAccountStats.idAttributes = ['_id']
BankAccountStats.version = 1
BankAccountStats.checkedAttributes = null
BankAccountStats.checkAttributes = null

module.exports = BankAccountStats
2 changes: 1 addition & 1 deletion packages/cozy-doctypes/src/banking/BankTransaction.js
Expand Up @@ -330,7 +330,7 @@ Transaction.version = 1
Transaction.vendorAccountIdAttr = 'vendorAccountId'
Transaction.vendorIdAttr = 'vendorId'
Transaction.idAttributes = ['vendorId']
Transaction.checkedAttributes = [
Transaction.checkAttributes = [
'label',
'originalBankLabel',
'automaticCategoryId',
Expand Down

0 comments on commit 68ffa1d

Please sign in to comment.