From 0962132d6b56f2d9ffa060d93d87a03f4caadd30 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Tue, 23 Jun 2015 19:43:29 +0100 Subject: [PATCH] Pass entity type to autocompleteEntities, not layer id (fixes #2810) If (for example) you have a type of entities, "participants", and a second annotation layer for them, like this: { "id": "participantsdiscussed", "title": "Participants discussed", "type": "entity", "entity": "participants" } then we should be passing key="participants" to autocompleteEntities (since that is the type of entity), not key="participantsdiscussed" (which is not a type of entities and raises an error). --- static/js/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/editor.js b/static/js/editor.js index 7e7ad8b..ff421f6 100644 --- a/static/js/editor.js +++ b/static/js/editor.js @@ -46,7 +46,7 @@ pandora.ui.editor = function(data) { autocomplete: layer.type == 'entity' ? function(key, value, callback) { pandora.api.autocompleteEntities({ - key: key, + key: layer.entity, operator: '=', range: [0, 20], value: value -- 2.4.3