From 59a1b9064e7713565a3c9fefdda461b64bc6fdbd Mon Sep 17 00:00:00 2001 From: SepehrYahyaee <7heycallmegray@gmail.com> Date: Sat, 18 Jul 2026 16:03:32 +0330 Subject: [PATCH] Removed the guard of accidentWay --- .../expert-initiated-blame.mirror.controller.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/request-management/expert-initiated-blame.mirror.controller.ts b/src/request-management/expert-initiated-blame.mirror.controller.ts index c022a4d..0bdbc23 100644 --- a/src/request-management/expert-initiated-blame.mirror.controller.ts +++ b/src/request-management/expert-initiated-blame.mirror.controller.ts @@ -1,6 +1,5 @@ import { extname } from "node:path"; import { - BadRequestException, Body, Controller, Param, @@ -362,20 +361,6 @@ export class ExpertInitiatedBlameMirrorController { @CurrentUser() expert: any, @UploadedFile() sign: Express.Multer.File, ) { - // Guard: accident fields (accidentWay, etc.) must be filled before signing. - // This prevents the expert from bypassing add-accident-fields and avoids the - // double-sign bug where add-accident-fields re-enters WAITING_FOR_SIGNATURES - // after a signature was already recorded. - const requestData = await this.requestManagementService.getBlameRequestV2( - requestId, - expert, - ); - if (!(requestData?.expert?.decision as any)?.fields?.accidentWay) { - throw new BadRequestException( - "Accident fields (accidentWay, accidentReason, accidentType) must be submitted via add-accident-fields before signing.", - ); - } - await this.mediaPolicyService.assertForBlame(sign, requestId, "image"); const partyRole = body?.partyRole === "SECOND" ? PartyRole.SECOND : PartyRole.FIRST;