From 4ef688b5348b5c0ab4268a459429ad2fe94a9f60 Mon Sep 17 00:00:00 2001 From: deepak jaison Date: Tue, 29 Oct 2024 11:41:37 +0000 Subject: [PATCH] Logic correction --- apps/backend/src/mutations/InstrumentMutations.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/backend/src/mutations/InstrumentMutations.ts b/apps/backend/src/mutations/InstrumentMutations.ts index 8c348d1c3..c43d7b7bf 100644 --- a/apps/backend/src/mutations/InstrumentMutations.ts +++ b/apps/backend/src/mutations/InstrumentMutations.ts @@ -473,15 +473,11 @@ export default class InstrumentMutations { techniquesWithProposal.map((technique) => technique.id) ); - let isXpress = false; - - if (instrumentWithTechnique && instrumentWithTechnique.length > 0) { - isXpress = instrumentWithTechnique.find( - (instruments) => instruments.id === args.instrumentIds[0] - ) - ? true - : false; - } + const isXpress = instrumentWithTechnique.find( + (instruments) => instruments.id === args.instrumentIds[0] + ) + ? true + : false; if (!isXpress) { return rejection('No permission to assign instrument for this proposal', {