From 40fbc1d2230f6cc965e692b27d16a135434c8229 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 13:32:31 +0100 Subject: [PATCH] restore exception validation logic with proper operator --- app/src/api/services/domainLogic/validateUpdate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/api/services/domainLogic/validateUpdate.ts b/app/src/api/services/domainLogic/validateUpdate.ts index b9e35d3a..9910a898 100644 --- a/app/src/api/services/domainLogic/validateUpdate.ts +++ b/app/src/api/services/domainLogic/validateUpdate.ts @@ -24,7 +24,9 @@ function canEdit(key: string, allowDerived: boolean = false) { export function validateFieldChange(field: string, value: any, isExternal: boolean = true) { if(!isDefined(field)) { - throw new InvalidFieldError('Field does not exist', field); + if(field !== 'is_extension'){ + throw new InvalidFieldError('Field does not exist', field); + } } const allowDerived = !isExternal;