aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/api/resource/AttributeResource.java5
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":