From 5d6c8c957acd098a20e674ce5529f60cbc9f4151 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Thu, 25 Feb 2021 20:33:00 +0100 Subject: [PATCH] Quick bugfix --- src/controllers/UserGroupController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/UserGroupController.ts b/src/controllers/UserGroupController.ts index c68baff..fd33f67 100644 --- a/src/controllers/UserGroupController.ts +++ b/src/controllers/UserGroupController.ts @@ -104,7 +104,7 @@ export class UserGroupController { @OnUndefined(204) @OpenAPI({ description: 'Delete the group whose id you provided.
If there are any permissions directly granted to the group they will get deleted as well.
Users associated with this group won\'t get deleted - just deassociated.
If no group with this id exists it will just return 204(no content).' }) async remove(@Param("id") id: number, @QueryParam("force") force: boolean) { - let group = await this.userGroupsRepository.findOne({ id: id }, { relations: ["permissions"] }); + let group = await this.userGroupsRepository.findOne({ id: id }); if (!group) { return null; } const responseGroup = await this.userGroupsRepository.findOne({ id: id }, { relations: ['permissions'] });