From 559be058b6ab66dc9148fb4ed347a0f969a45692 Mon Sep 17 00:00:00 2001 From: parveenkumaryadav Date: Wed, 28 Feb 2018 09:26:58 +0530 Subject: Cycle in group hierarchy bug fix while editing Groups --- src/org/traccar/database/GroupsManager.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/org/traccar/database/GroupsManager.java b/src/org/traccar/database/GroupsManager.java index c1a07a498..1d507a26a 100644 --- a/src/org/traccar/database/GroupsManager.java +++ b/src/org/traccar/database/GroupsManager.java @@ -75,6 +75,12 @@ public class GroupsManager extends BaseObjectManager implements Managable super.addNewItem(group); } + @Override + public void updateItem(Group group) throws SQLException { + checkGroupCycles(group); + super.updateItem(group); + } + @Override protected void updateCachedItem(Group group) { checkGroupCycles(group); -- cgit v1.2.3 From 18659ec7389438dcb4e913be969f163e025b26f2 Mon Sep 17 00:00:00 2001 From: parveenkumaryadav Date: Wed, 28 Feb 2018 13:18:20 +0530 Subject: removed double check for circular dependency --- src/org/traccar/database/GroupsManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/org/traccar/database/GroupsManager.java b/src/org/traccar/database/GroupsManager.java index 1d507a26a..9f0c463f7 100644 --- a/src/org/traccar/database/GroupsManager.java +++ b/src/org/traccar/database/GroupsManager.java @@ -78,7 +78,8 @@ public class GroupsManager extends BaseObjectManager implements Managable @Override public void updateItem(Group group) throws SQLException { checkGroupCycles(group); - super.updateItem(group); + getDataManager().updateObject(group); + super.updateCachedItem(group); } @Override -- cgit v1.2.3 From 2c8392a0e16044905d983da56ab0919eadbb3858 Mon Sep 17 00:00:00 2001 From: parveenkumaryadav Date: Wed, 28 Feb 2018 14:42:31 +0530 Subject: removed overrided updateCachedItem from GroupsManager --- src/org/traccar/database/GroupsManager.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src') diff --git a/src/org/traccar/database/GroupsManager.java b/src/org/traccar/database/GroupsManager.java index 9f0c463f7..262f15519 100644 --- a/src/org/traccar/database/GroupsManager.java +++ b/src/org/traccar/database/GroupsManager.java @@ -78,14 +78,7 @@ public class GroupsManager extends BaseObjectManager implements Managable @Override public void updateItem(Group group) throws SQLException { checkGroupCycles(group); - getDataManager().updateObject(group); - super.updateCachedItem(group); - } - - @Override - protected void updateCachedItem(Group group) { - checkGroupCycles(group); - super.updateCachedItem(group); + super.updateItem(group); } @Override -- cgit v1.2.3