Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: type check

Daniel Hougaard4e68304262b4
diff --git a/backend/src/services/group-project/group-project-service.ts b/backend/src/services/group-project/group-project-service.ts
index 62a6c08b41..b84cfe1a28 100644
--- a/backend/src/services/group-project/group-project-service.ts
+++ b/backend/src/services/group-project/group-project-service.ts
@@ -83,7 +83,6 @@ export const groupProjectServiceFactory = ({
const isUuid = isUuidV4(groupIdOrName);
let group: TGroups | null = null;
- // id can only be a uuid, name can be anything
if (isUuid) {
group = await groupDAL.findOne({ orgId: actorOrgId, id: groupIdOrName });
}
@@ -139,7 +138,7 @@ export const groupProjectServiceFactory = ({
const projectGroup = await groupProjectDAL.transaction(async (tx) => {
const groupProjectMembership = await groupProjectDAL.create(
{
- groupId: group.id,
+ groupId: group!.id,
projectId: project.id
},
tx
@@ -174,7 +173,7 @@ export const groupProjectServiceFactory = ({
// share project key with users in group that have not
// individually been added to the project and that are not part of
// other groups that are in the project
- const groupMembers = await userGroupMembershipDAL.findGroupMembersNotInProject(group.id, project.id, tx);
+ const groupMembers = await userGroupMembershipDAL.findGroupMembersNotInProject(group!.id, project.id, tx);
if (groupMembers.length) {
const ghostUser = await projectDAL.findProjectGhostUser(project.id, tx);