diff options
Diffstat (limited to 'src/org/traccar/api/resource/AttributeResource.java')
-rw-r--r-- | src/org/traccar/api/resource/AttributeResource.java | 3 |
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(); } |