diff --git a/apps/applications/templates/applications/remote_app_create_update.html b/apps/applications/templates/applications/remote_app_create_update.html index 897126f98..246479fb3 100644 --- a/apps/applications/templates/applications/remote_app_create_update.html +++ b/apps/applications/templates/applications/remote_app_create_update.html @@ -110,16 +110,15 @@ function hiddenFields(){ function constructParams(data) { var typeList = ['chrome', 'mysql_workbench', 'vmware_client', 'custom']; var params = {}; - for (var type in typeList){ - if (data.type === type){ + $.each(typeList, function(index, value){ + if (data.type === value){ for (var k in data){ - if (k.startsWith(data.type)){ + if (k.startsWith(value)){ params[k] = data[k] } } - break } - } + }); return params; } $(document).ready(function () { diff --git a/apps/assets/backends/manager.py b/apps/assets/backends/manager.py index 6745ea44b..201f19d43 100644 --- a/apps/assets/backends/manager.py +++ b/apps/assets/backends/manager.py @@ -71,9 +71,9 @@ class AssetUserManager: if len(instances) == 1: return instances[0] elif len(instances) == 0: - self.raise_does_not_exist(self.__name__) + self.raise_does_not_exist(self.__class__.__name__) else: - self.raise_multiple_return(self.__name__, len(instances)) + self.raise_multiple_return(self.__class__.__name__, len(instances)) def raise_does_not_exist(self, name): raise self.ObjectDoesNotExist(self.MSG_NOT_EXIST.format(name))