entity bugs
This commit is contained in:
@@ -107,9 +107,6 @@ export class RolesService {
|
||||
if (!role) {
|
||||
throw new NotFoundException('Role not found');
|
||||
}
|
||||
if (!role.admins.isEmpty()) {
|
||||
throw new BadRequestException('Role has admins');
|
||||
}
|
||||
|
||||
// Hard delete pivot table entries (role_permissions) before soft deleting the role
|
||||
await this.em.nativeDelete(RolePermission, { role: { id: role.id } });
|
||||
|
||||
Reference in New Issue
Block a user