aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database/DeviceManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/database/DeviceManager.java')
-rw-r--r--src/main/java/org/traccar/database/DeviceManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/database/DeviceManager.java b/src/main/java/org/traccar/database/DeviceManager.java
index 0e5056e57..b1ea0b8b7 100644
--- a/src/main/java/org/traccar/database/DeviceManager.java
+++ b/src/main/java/org/traccar/database/DeviceManager.java
@@ -68,7 +68,7 @@ public class DeviceManager extends BaseObjectManager<Device> implements Identity
}
@Override
- public long addUnknownDevice(String uniqueId) {
+ public Device addUnknownDevice(String uniqueId) {
Device device = new Device();
device.setName(uniqueId);
device.setUniqueId(uniqueId);
@@ -89,10 +89,10 @@ public class DeviceManager extends BaseObjectManager<Device> implements Identity
Context.getPermissionsManager().refreshAllExtendedPermissions();
}
- return device.getId();
+ return device;
} catch (StorageException e) {
LOGGER.warn("Automatic device registration error", e);
- return 0;
+ return null;
}
}