aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BaseProtocolDecoder.java')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java
index 9e04fa5cd..103a999b0 100644
--- a/src/org/traccar/BaseProtocolDecoder.java
+++ b/src/org/traccar/BaseProtocolDecoder.java
@@ -40,10 +40,11 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
device.setUniqueId(uniqueId);
device.setCategory(Context.getConfig().getString("database.registerUnknown.defaultCategory", "default"));
- if(!defaultGroupName.equals("NOTDEFINED")){
+ if (!defaultGroupName.equals("NOTDEFINED")) {
Group defaultGroup = Context.getDeviceManager().getGroupByName(defaultGroupName);
- if(defaultGroup != null)
+ if (defaultGroup != null) {
device.setGroupId(defaultGroup.getId());
+ }
}
try {
@@ -192,4 +193,4 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
}
}
-} \ No newline at end of file
+}