From 58ed19ec26658db0d1adfc33b47e7df505ea392d Mon Sep 17 00:00:00 2001 From: DemeritCowboy Date: Thu, 7 Mar 2019 10:36:12 -0500 Subject: [PATCH] dev/core#784 --- ang/crmCaseType.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); }); } -- 2.25.1