diff --git a/package-lock.json b/package-lock.json index 7943296143..3f7dc9047d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alkemio-server", - "version": "0.82.3", + "version": "0.82.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "alkemio-server", - "version": "0.82.3", + "version": "0.82.4", "license": "EUPL-1.2", "dependencies": { "@alkemio/matrix-adapter-lib": "^0.3.6", diff --git a/package.json b/package.json index 518ba63b2f..178e406a25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alkemio-server", - "version": "0.82.3", + "version": "0.82.4", "description": "Alkemio server, responsible for managing the shared Alkemio platform", "author": "Alkemio Foundation", "private": false, diff --git a/src/migrations/1719550326418-accountStorage.ts b/src/migrations/1719550326418-accountStorage.ts index 8ce5fb9ca7..367c5e2e6c 100644 --- a/src/migrations/1719550326418-accountStorage.ts +++ b/src/migrations/1719550326418-accountStorage.ts @@ -22,9 +22,13 @@ export class accountStorage1719550326418 implements MigrationInterface { }[] = await queryRunner.query( `SELECT id, storageAggregatorId FROM space WHERE id = '${account.spaceId}'` ); - await queryRunner.query( - `UPDATE storage_aggregator SET parentStorageAggregatorId = '${accountStorageAggregatorID}' WHERE id = '${rootSpace.storageAggregatorId}'` - ); + if (rootSpace) { + await queryRunner.query( + `UPDATE storage_aggregator SET parentStorageAggregatorId = '${accountStorageAggregatorID}' WHERE id = '${rootSpace.storageAggregatorId}'` + ); + } else { + console.log(`No root space found for account ${account.id}`); + } } await queryRunner.query(