From 5e6cf2af4b0a4a6aaca2a77e16be6c38805d55e4 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Tue, 8 Jul 2025 02:14:45 -0700 Subject: [PATCH] return early if userIds is empty --- apps/server/src/core/group/services/group-user.service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/server/src/core/group/services/group-user.service.ts b/apps/server/src/core/group/services/group-user.service.ts index 0d83109b..1c9d1cf8 100644 --- a/apps/server/src/core/group/services/group-user.service.ts +++ b/apps/server/src/core/group/services/group-user.service.ts @@ -47,6 +47,8 @@ export class GroupUserService { const db = dbOrTx(this.db, trx); await this.groupService.findAndValidateGroup(groupId, workspaceId, trx); + if (userIds.length === 0) return; + // make sure we have valid workspace users const validUsers = await db .selectFrom('users')