aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/Device.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java
index 4c02481ca..2324da532 100644
--- a/src/org/traccar/model/Device.java
+++ b/src/org/traccar/model/Device.java
@@ -47,15 +47,11 @@ public class Device extends Extensible {
private String status;
public String getStatus() {
- return status;
+ return status != null ? status : STATUS_OFFLINE;
}
public void setStatus(String status) {
- if (STATUS_ONLINE.equals(status) || STATUS_UNKNOWN.equals(status)) {
- this.status = status;
- } else {
- this.status = STATUS_OFFLINE;
- }
+ this.status = status;
}
private Date lastUpdate;