|
|
|
@ -616,8 +616,10 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid
|
|
|
|
|
if (device == null) {
|
|
|
|
|
throw new DeviceNotFoundException("Device not found for id '" + deviceIdentifier.getId() + "'");
|
|
|
|
|
}
|
|
|
|
|
if (!this.groupDAO.isDeviceMappedToGroup(groupId, device.getId(), tenantId)){
|
|
|
|
|
this.groupDAO.addDevice(groupId, device.getId(), tenantId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
GroupManagementDAOFactory.commitTransaction();
|
|
|
|
|
} catch (DeviceManagementException e) {
|
|
|
|
|
throw new GroupManagementException("Error occurred while retrieving device.", e);
|
|
|
|
|