aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web/server')
-rw-r--r--src/org/traccar/web/server/model/DataServiceImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java
index f9d0e7e3..9c69b48e 100644
--- a/src/org/traccar/web/server/model/DataServiceImpl.java
+++ b/src/org/traccar/web/server/model/DataServiceImpl.java
@@ -142,7 +142,8 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
try {
device = entityManager.merge(device);
user.getDevices().remove(device);
- entityManager.remove(device);
+ // If you want to remove device you need to remove all linked positions
+ //entityManager.remove(device);
entityManager.getTransaction().commit();
} catch (Exception e) {
entityManager.getTransaction().rollback();