mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix issue in duplicate mapping
This commit is contained in:
parent
94a50584f4
commit
664b3d4d43
@ -616,7 +616,9 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid
|
||||
if (device == null) {
|
||||
throw new DeviceNotFoundException("Device not found for id '" + deviceIdentifier.getId() + "'");
|
||||
}
|
||||
this.groupDAO.addDevice(groupId, device.getId(), tenantId);
|
||||
if (!this.groupDAO.isDeviceMappedToGroup(groupId, device.getId(), tenantId)){
|
||||
this.groupDAO.addDevice(groupId, device.getId(), tenantId);
|
||||
}
|
||||
}
|
||||
GroupManagementDAOFactory.commitTransaction();
|
||||
} catch (DeviceManagementException e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user