diff --git a/backend/src/professionals/professionals.service.ts b/backend/src/professionals/professionals.service.ts index add597e..7f15ff8 100644 --- a/backend/src/professionals/professionals.service.ts +++ b/backend/src/professionals/professionals.service.ts @@ -179,9 +179,7 @@ export class ProfessionalsService { } async resetRejected(userId: string) { - const prof = await this.prisma.professionals.findUnique({ where: { user_id: userId } }); - if (!prof) throw new NotFoundException('No se encontrĂ³ solicitud'); - // Reset to 0 without deleting — avoids FK constraint errors from services/reputations + // Always reset pro_state regardless of whether a professional record exists await this.prisma.users.update({ where: { id: userId }, data: { pro_state: 0 } }); return { message: 'Solicitud reiniciada' }; }