From c9161329432fe37e5be735a1ea6764b7dc582db7 Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Tue, 8 Aug 2023 18:38:05 +1000 Subject: [PATCH] fix: remove the default project group from the organization --- services/api/src/resources/organization/resolvers.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/api/src/resources/organization/resolvers.ts b/services/api/src/resources/organization/resolvers.ts index f8c9e7ecf5..1a2c4248a7 100644 --- a/services/api/src/resources/organization/resolvers.ts +++ b/services/api/src/resources/organization/resolvers.ts @@ -623,6 +623,15 @@ export const removeProjectFromOrganization: ResolverFn = async ( if (projectGroups[g].attributes["type"] == "project-default-group") { // remove all users from the project default group except the `default-user@project` await models.GroupModel.removeNonProjectDefaultUsersFromGroup(projectGroups[g], project.name) + // update group + await models.GroupModel.updateGroup({ + id: projectGroups[g].id, + name: projectGroups[g].name, + attributes: { + ...projectGroups[g].attributes, + "lagoon-organization": "" + } + }); } else { removeGroups.push(projectGroups[g]) }