From: DemeritCowboy Date: Thu, 7 Mar 2019 15:36:12 +0000 (-0500) Subject: dev/core#784 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=58ed19ec26658db0d1adfc33b47e7df505ea392d;p=civicrm-core.git dev/core#784 --- diff --git a/ang/crmCaseType.js b/ang/crmCaseType.js index 986b1ccaed..b4758afb0f 100644 --- a/ang/crmCaseType.js +++ b/ang/crmCaseType.js @@ -436,8 +436,10 @@ } else { CRM.loadForm(CRM.url('civicrm/admin/reltype', {action: 'add', reset: 1, label_a_b: roleName, label_b_a: roleName})) .on('crmFormSuccess', function(e, data) { - roles.push({name: data.relationshipType[REL_TYPE_CNAME]}); - $scope.relationshipTypeOptions.push({id: data.relationshipType[REL_TYPE_CNAME], text: data.relationshipType.label_b_a}); + var newTypes = _.values(data.relationshipType); + var newType = newTypes[0]; + roles.push({name: newType[REL_TYPE_CNAME]}); + $scope.relationshipTypeOptions.push({id: newType[REL_TYPE_CNAME], text: newType.label_b_a}); $scope.$digest(); }); }