diff --git a/packages/backend/src/core/SystemAccountService.ts b/packages/backend/src/core/SystemAccountService.ts index 70ecd38db2..cba4c7741b 100644 --- a/packages/backend/src/core/SystemAccountService.ts +++ b/packages/backend/src/core/SystemAccountService.ts @@ -97,11 +97,11 @@ export class SystemAccountService implements OnApplicationShutdown { const userId = await this.cache.fetch(type, async () => { const systemAccount = await this.systemAccountsRepository.findOne({ where: { type: type }, - select: { id: true }, - }) as { id: string } | null; + select: { userId: true }, + }) as { userId: string } | null; if (systemAccount) { - return systemAccount.id; + return systemAccount.userId; } else { const created = await this.createCorrespondingUser(type, { username: `system.${type}`, // NOTE: (できれば避けたいが) . が含まれるかどうかでシステムアカウントかどうかを判定している処理もあるので変えないように