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) {
edgeService.getEdge(edgeId, true).then(
function success(edge) {
customerService.getCustomer(edge.customerId.id, { ignoreErrors: true }).then(
function success(customer) {
vm.customerTitle = $translate.instant('edge.assigned-to-customer-widget', { customerTitle: customer.title });
},
function fail() {
}
);
if (edge.customerId.id !== types.id.nullUid) {
customerService.getCustomer(edge.customerId.id, { ignoreErrors: true }).then(
function success(customer) {
vm.customerTitle = $translate.instant('edge.assigned-to-customer-widget', { customerTitle: customer.title });
},
function fail() {
}
);
}
},
function fail() {
}

Loading…
Cancel
Save