diff --git a/src/lib/services/group-service.ts b/src/lib/services/group-service.ts index 6e2644686e..ea4e652252 100644 --- a/src/lib/services/group-service.ts +++ b/src/lib/services/group-service.ts @@ -170,18 +170,16 @@ export class GroupService { return []; } - async deleteGroup(id: number, userName?: string): Promise { + async deleteGroup(id: number, userName: string): Promise { const group = await this.groupStore.get(id); await this.groupStore.delete(id); - if (userName) { - await this.eventStore.store({ - type: GROUP_DELETED, - createdBy: userName, - data: group, - }); - } + await this.eventStore.store({ + type: GROUP_DELETED, + createdBy: userName, + data: group, + }); } async validateGroup(