diff options
author | Khurshid Fayzullaev <khurshidfayzullaev@yahoo.com> | 2014-04-10 16:01:44 -0400 |
---|---|---|
committer | Khurshid Fayzullaev <khurshidfayzullaev@yahoo.com> | 2014-04-10 16:01:44 -0400 |
commit | 99a02b06a63a3c48999575a1db2a6dc093812ee2 (patch) | |
tree | 2d5ddf89cd711b16c9eacb07aad6b25bfcba9aa2 /src/org/traccar | |
parent | 4f0750af0eabce7b6689847d070a0237b1130955 (diff) | |
download | trackermap-web-99a02b06a63a3c48999575a1db2a6dc093812ee2.tar.gz trackermap-web-99a02b06a63a3c48999575a1db2a6dc093812ee2.tar.bz2 trackermap-web-99a02b06a63a3c48999575a1db2a6dc093812ee2.zip |
Update DataServiceImpl.java
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/web/server/model/DataServiceImpl.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java index 3164b102..7f4172e0 100644 --- a/src/org/traccar/web/server/model/DataServiceImpl.java +++ b/src/org/traccar/web/server/model/DataServiceImpl.java @@ -303,12 +303,11 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService public Device addDevice(Device device) { EntityManager entityManager = getSessionEntityManager(); synchronized (entityManager) { - User user = getSessionUser(); - TypedQuery<Device> query = entityManager.createQuery("SELECT x FROM Device x WHERE x.uniqueId = :id", Device.class); query.setParameter("id", device.getUniqueId()); List<Device> results = query.getResultList(); + ser user = getSessionUser(); entityManager.getTransaction().begin(); try { if (results.isEmpty()) { |