Fix issue in duplicate mapping

merge-requests/7/head
charitha 8 years ago
parent 94a50584f4
commit 664b3d4d43

@ -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);

Loading…
Cancel
Save