Skip to content

Commit

Permalink
Fix/service agreement prunning migration fix (#3250)
Browse files Browse the repository at this point in the history
* Fix missing return in getCountOfServiceAgreementsByBlockchainAndContract

* Add commnet for removeServiceAgreementsByBlockchainAndContract

* Version bump
  • Loading branch information
Mihajlo-Pavlovic authored Jul 19, 2024
1 parent 15069ae commit f12c6cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "origintrail_node",
"version": "6.5.1+hotfix.1",
"version": "6.5.1+hotfix.2",
"description": "OTNode V6",
"main": "index.js",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class ServiceAgreementRepository {
}

async getCountOfServiceAgreementsByBlockchainAndContract(blockchainId, contract) {
await this.model.count({
return this.model.count({
where: {
blockchainId,
assetStorageContractAddress: {
Expand All @@ -298,6 +298,7 @@ class ServiceAgreementRepository {
});
}

// Sequelize destroy method doesn't support limit
async removeServiceAgreementsByBlockchainAndContract(blockchainId, contract) {
const query = `
DELETE FROM service_agreement
Expand Down

0 comments on commit f12c6cb

Please sign in to comment.