aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/AttributeResource.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-23 08:19:48 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-23 08:19:48 +0500
commitf92b5cd97a5d2159a890fb4817238f4c1bbb2a12 (patch)
tree015895111dd9097a0d948ea674e3ca042765db61 /src/org/traccar/api/resource/AttributeResource.java
parentd9c87071eb8d8270a777f5ec990dd1978c2f67c7 (diff)
downloadtrackermap-server-f92b5cd97a5d2159a890fb4817238f4c1bbb2a12.tar.gz
trackermap-server-f92b5cd97a5d2159a890fb4817238f4c1bbb2a12.tar.bz2
trackermap-server-f92b5cd97a5d2159a890fb4817238f4c1bbb2a12.zip
Remove proxy function
Diffstat (limited to 'src/org/traccar/api/resource/AttributeResource.java')
-rw-r--r--src/org/traccar/api/resource/AttributeResource.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/AttributeResource.java b/src/org/traccar/api/resource/AttributeResource.java
index 7e6947d26..7b81d3ffb 100644
--- a/src/org/traccar/api/resource/AttributeResource.java
+++ b/src/org/traccar/api/resource/AttributeResource.java
@@ -38,6 +38,7 @@ import org.traccar.api.BaseResource;
import org.traccar.database.AttributesManager;
import org.traccar.model.Attribute;
import org.traccar.model.Position;
+import org.traccar.model.User;
import org.traccar.processing.ComputedAttributesHandler;
@Path("attributes/computed")
@@ -87,7 +88,7 @@ public class AttributeResource extends BaseResource {
private Response add(Attribute entity) throws SQLException {
Context.getPermissionsManager().checkReadonly(getUserId());
Context.getAttributesManager().addItem(entity);
- linkNewEntity(entity);
+ Context.getDataManager().linkObject(User.class, getUserId(), entity.getClass(), entity.getId(), true);
Context.getAttributesManager().refreshUserItems();
return Response.ok(entity).build();
}