diff --git a/submodules/devices/devices.js b/submodules/devices/devices.js index bf568c3..b474192 100644 --- a/submodules/devices/devices.js +++ b/submodules/devices/devices.js @@ -1199,20 +1199,25 @@ define(function(require){ devicesGetIterator: function(args, callbackSuccess, callbackError) { var self = this; - monster.request({ - resource: 'provisioner.ui.getModel', - data: { - brand: args.endpoint_brand, - family: args.endpoint_family, - model: args.endpoint_model - }, - success: function(data, status) { - callbackSuccess && callbackSuccess(data.data.template); - }, - error: function(data, status) { - callbackError && callbackError(); - } - }); + if(args.hasOwnProperty('endpoint_brand') && args.hasOwnProperty('endpoint_family') && args.hasOwnProperty('endpoint_model')) { + monster.request({ + resource: 'provisioner.ui.getModel', + data: { + brand: args.endpoint_brand, + family: args.endpoint_family, + model: args.endpoint_model + }, + success: function(data, status) { + callbackSuccess && callbackSuccess(data.data.template); + }, + error: function(data, status) { + + } + }); + } + else { + callbackError && callbackError(); + } } }; diff --git a/views/devices-sip_device.html b/views/devices-sip_device.html index a4d9fa6..5046e75 100644 --- a/views/devices-sip_device.html +++ b/views/devices-sip_device.html @@ -1,7 +1,7 @@
- {{#if provision}} + {{#if provision.endpoint_brand}}
{{provision.endpoint_brand}} - {{provision.endpoint_model}}
{{else}}