dev/core#784
authorDemeritCowboy <demeritcowboy@hotmail.com>
Thu, 7 Mar 2019 15:36:12 +0000 (10:36 -0500)
committerDemeritCowboy <demeritcowboy@hotmail.com>
Sun, 24 Mar 2019 11:38:18 +0000 (07:38 -0400)
ang/crmCaseType.js

index 986b1ccaed862c2ebfcbe45e43a4622dc35ff48a..b4758afb0f9891e7dc76e714300cd1bcbe172ba4 100644 (file)
         } 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();
             });
         }