diff --git a/ayanova/src/views/customer-csr-edit.vue b/ayanova/src/views/customer-csr-edit.vue index 38fe72bc..a2be5697 100644 --- a/ayanova/src/views/customer-csr-edit.vue +++ b/ayanova/src/views/customer-csr-edit.vue @@ -409,9 +409,13 @@ export default { vm.unitObj ); if (res.error) { - window.$gz.errorHandler.handleFormError(res.error); //no vm passed here so that it displays as a dialog rather than in the form + //no vm passed here so that it displays as a dialog rather than in the form + window.$gz.errorHandler.handleFormError(res.error); } else { - if (res.data.id) { + if (res.data) { + if (vm.obj.unitId == null) { + vm.obj.unitId = res.data; + } //SUCCESS this.addUnitDialog = false; }