Browse Source

Fix customerTitle for customer with nullUid

pull/3957/head
Artem Babak 6 years ago
parent
commit
43570a483c
  1. 16
      ui/src/app/widget/lib/edges-overview-widget.js

16
ui/src/app/widget/lib/edges-overview-widget.js

@ -201,13 +201,15 @@ function EdgesOverviewWidgetController($scope, $translate, types, utils, entityS
function getCustomerTitle(edgeId) { function getCustomerTitle(edgeId) {
edgeService.getEdge(edgeId, true).then( edgeService.getEdge(edgeId, true).then(
function success(edge) { function success(edge) {
customerService.getCustomer(edge.customerId.id, { ignoreErrors: true }).then( if (edge.customerId.id !== types.id.nullUid) {
function success(customer) { customerService.getCustomer(edge.customerId.id, { ignoreErrors: true }).then(
vm.customerTitle = $translate.instant('edge.assigned-to-customer-widget', { customerTitle: customer.title }); function success(customer) {
}, vm.customerTitle = $translate.instant('edge.assigned-to-customer-widget', { customerTitle: customer.title });
function fail() { },
} function fail() {
); }
);
}
}, },
function fail() { function fail() {
} }

Loading…
Cancel
Save