mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix group update issue
This commit is contained in:
parent
469a88334b
commit
17638029d3
@ -194,8 +194,8 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid
|
|||||||
GroupManagementDAOFactory.beginTransaction();
|
GroupManagementDAOFactory.beginTransaction();
|
||||||
DeviceGroup existingGroup = this.groupDAO.getGroup(groupId, tenantId);
|
DeviceGroup existingGroup = this.groupDAO.getGroup(groupId, tenantId);
|
||||||
if (existingGroup != null) {
|
if (existingGroup != null) {
|
||||||
boolean existingGroupName = this.groupDAO.getGroup(deviceGroup.getName(), tenantId) != null;
|
DeviceGroup existingGroupByName = this.groupDAO.getGroup(deviceGroup.getName(), tenantId);
|
||||||
if (existingGroupName) {
|
if (existingGroupByName != null && existingGroupByName.getGroupId() != groupId) {
|
||||||
throw new GroupAlreadyExistException("Group already exists with name '" + deviceGroup.getName() + "'.");
|
throw new GroupAlreadyExistException("Group already exists with name '" + deviceGroup.getName() + "'.");
|
||||||
}
|
}
|
||||||
List<DeviceGroup> groupsToUpdate = new ArrayList<>();
|
List<DeviceGroup> groupsToUpdate = new ArrayList<>();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user