From 5d7af5e011d4275ec8a0bb1ba5e701d5e80144e9 Mon Sep 17 00:00:00 2001 From: danbenton-mojdt <113102670+danbenton-mojdt@users.noreply.github.com> Date: Tue, 30 Jan 2024 08:15:31 +0000 Subject: [PATCH] =?UTF-8?q?MAP-627=20Fix=20control=20and=20restraint=20bug?= =?UTF-8?q?=20where=20old=20reports=20store=20false=20f=E2=80=A6=20(#679)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * MAP-627 Fix control and restraint bug where old reports store false for restraint * MAP-627 Fix validation of standing straight arm hold --- server/config/forms/useOfForceDetailsForm.js | 2 +- server/services/reportSummary.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/config/forms/useOfForceDetailsForm.js b/server/config/forms/useOfForceDetailsForm.js index 56ca7b14..5ca5c200 100644 --- a/server/config/forms/useOfForceDetailsForm.js +++ b/server/config/forms/useOfForceDetailsForm.js @@ -105,7 +105,7 @@ const completeSchema = joi.object({ 'STANDING__DOUBLE_WRIST_HOLD', 'STANDING__UNDERHOOK', 'STANDING__WRIST_HOLD', - 'STANDING__STRAIGHT_HOLD', + 'STANDING__STRAIGHT_ARM_HOLD', 'ON_BACK', 'ON_BACK__STRAIGHT_ARM_HOLD', 'ON_BACK__CONVERSION_TO_RBH', diff --git a/server/services/reportSummary.ts b/server/services/reportSummary.ts index 8f22f722..3f2d670a 100644 --- a/server/services/reportSummary.ts +++ b/server/services/reportSummary.ts @@ -73,7 +73,7 @@ const createUseOfForceDetails = ( controlAndRestraintUsed: details.restraint === undefined || details.restraint ? getRestraintPositions(details.restraintPositions) - : getRestraintPositions(ControlAndRestraintPosition.NONE), + : getRestraintPositions(ControlAndRestraintPosition.NONE.value), painInducingTechniques: getPainInducingTechniques(details), handcuffsApplied: details.handcuffsApplied,