Revert "restore exception validation logic with proper operator"

This reverts commit 40fbc1d223.
This commit is contained in:
Ed Chalstrey 2022-06-06 14:02:11 +01:00
parent 40fbc1d223
commit 0dcad9d36f

View File

@ -24,10 +24,8 @@ function canEdit(key: string, allowDerived: boolean = false) {
export function validateFieldChange(field: string, value: any, isExternal: boolean = true) { export function validateFieldChange(field: string, value: any, isExternal: boolean = true) {
if(!isDefined(field)) { if(!isDefined(field)) {
if(field !== 'is_extension'){
throw new InvalidFieldError('Field does not exist', field); throw new InvalidFieldError('Field does not exist', field);
} }
}
const allowDerived = !isExternal; const allowDerived = !isExternal;
if(!canEdit(field, allowDerived)) { if(!canEdit(field, allowDerived)) {