restore exception validation logic with proper operator

This commit is contained in:
Ed Chalstrey 2022-06-06 13:32:31 +01:00
parent 7dae80e73a
commit 40fbc1d223

View File

@ -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;