entity bugs

This commit is contained in:
2026-01-14 15:19:18 +03:30
parent 209a4fc723
commit aed4a1b333
12 changed files with 35 additions and 24 deletions
@@ -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 } });