Skip to content

Commit

Permalink
Logic correction
Browse files Browse the repository at this point in the history
  • Loading branch information
deepaksftc committed Oct 31, 2024
1 parent 245bcb6 commit 4ef688b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions apps/backend/src/mutations/InstrumentMutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down

0 comments on commit 4ef688b

Please sign in to comment.