Merge pull request 'Fix to ignore devicetype check for webclip' (#287) from prathabanKavin/device-mgt-core:webclipfix into master

Reviewed-on: community/device-mgt-core#287
certificate-patch
commit 73bf440852

@ -177,6 +177,8 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
try { try {
// Only for iOS devices // Only for iOS devices
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
// Ignore checking device type if app is a web clip
if(!applicationDTO.getType().equals("WEB_CLIP")){
if (DeviceTypes.IOS.toString().equalsIgnoreCase(APIUtil.getDeviceTypeData(applicationDTO if (DeviceTypes.IOS.toString().equalsIgnoreCase(APIUtil.getDeviceTypeData(applicationDTO
.getDeviceTypeId()).getName())) { .getDeviceTypeId()).getName())) {
// TODO: replace getAssetByAppId with the correct one in DAO // TODO: replace getAssetByAppId with the correct one in DAO
@ -196,6 +198,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
vppManager.addAssociation(storedAsset, users); vppManager.addAssociation(storedAsset, users);
} }
} }
}
} catch (BadRequestException e) { } catch (BadRequestException e) {
String msg = "Device Type not found"; String msg = "Device Type not found";
log.error(msg, e); log.error(msg, e);

Loading…
Cancel
Save