diff options
author | Anton Tananaev <anton@traccar.org> | 2022-10-07 06:30:03 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-10-07 06:30:03 -0700 |
commit | dfaef4eca85a065e35c360fd6f712b2ad62f2e7a (patch) | |
tree | 5d8f5131218f81ce2f5c9e9dbef0829d66995302 /src | |
parent | ab9ff21bec23723132ed8183979be22b67c1cb3c (diff) | |
download | trackermap-server-dfaef4eca85a065e35c360fd6f712b2ad62f2e7a.tar.gz trackermap-server-dfaef4eca85a065e35c360fd6f712b2ad62f2e7a.tar.bz2 trackermap-server-dfaef4eca85a065e35c360fd6f712b2ad62f2e7a.zip |
Fix attributes test (fix #4956)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/api/resource/AttributeResource.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/api/resource/AttributeResource.java b/src/main/java/org/traccar/api/resource/AttributeResource.java index fb74b9bbe..f85e90133 100644 --- a/src/main/java/org/traccar/api/resource/AttributeResource.java +++ b/src/main/java/org/traccar/api/resource/AttributeResource.java @@ -29,7 +29,6 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.traccar.api.ExtendedObjectResource; -import org.traccar.config.Config; import org.traccar.model.Attribute; import org.traccar.model.Device; import org.traccar.model.Position; @@ -45,7 +44,7 @@ import org.traccar.storage.query.Request; public class AttributeResource extends ExtendedObjectResource<Attribute> { @Inject - private Config config; + private ComputedAttributesHandler computedAttributesHandler; public AttributeResource() { super(Attribute.class); @@ -61,7 +60,7 @@ public class AttributeResource extends ExtendedObjectResource<Attribute> { new Columns.All(), new Condition.LatestPositions(deviceId))); - Object result = new ComputedAttributesHandler(config, null).computeAttribute(entity, position); + Object result = computedAttributesHandler.computeAttribute(entity, position); if (result != null) { switch (entity.getType()) { case "number": |