diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index 6a6c71ec2a..2d9008af71 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -1081,13 +1081,13 @@ export class StateService implements StateServiceAbstraction { } async getOrganizations(options?: StorageOptions): Promise<{ [id: string]: OrganizationData; }> { - return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))?.data?.organizations; + return (await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))?.data?.organizations; } async setOrganizations(value: { [id: string]: OrganizationData; }, options?: StorageOptions): Promise { - const account = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)); + const account = await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())); account.data.organizations = value; - await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions)); + await this.saveAccount(account, this.reconcileOptions(options, await this.defaultOnDiskOptions())); } async getPasswordGenerationOptions(options?: StorageOptions): Promise {