diff options
author | I. MERABTENE <95150308+merabtenei@users.noreply.github.com> | 2023-05-29 10:35:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-29 10:35:28 +0100 |
commit | ef3088a09c42e518fe9c6a313b9c15523adb8b15 (patch) | |
tree | 875dbc70e6adfdf7ad21b67e4e97f6df1dca7dbb | |
parent | 6cc15fb06c9490e349847e043eea7c188e88794e (diff) | |
download | trackermap-server-ef3088a09c42e518fe9c6a313b9c15523adb8b15.tar.gz trackermap-server-ef3088a09c42e518fe9c6a313b9c15523adb8b15.tar.bz2 trackermap-server-ef3088a09c42e518fe9c6a313b9c15523adb8b15.zip |
Update src/main/java/org/traccar/model/ExtendedModel.java
Co-authored-by: Anton Tananaev <anton.tananaev@gmail.com>
-rw-r--r-- | src/main/java/org/traccar/model/ExtendedModel.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/model/ExtendedModel.java b/src/main/java/org/traccar/model/ExtendedModel.java index d3d247fdd..9da9c7529 100644 --- a/src/main/java/org/traccar/model/ExtendedModel.java +++ b/src/main/java/org/traccar/model/ExtendedModel.java @@ -90,8 +90,9 @@ public class ExtendedModel extends BaseModel { } public String getString(String key, String defaultValue) { - if (attributes.containsKey(key) && attributes.get(key) != null) { - return attributes.get(key).toString(); + if (attributes.containsKey(key)) { + Object value = attributes.get(key); + return value != null ? value.toString() : value; } else { return defaultValue; } |