From e55e5036544f4044df8ad49bef9b26fa8216bb00 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 24 Jun 2015 16:42:38 +0200 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 7e7ad8b5d..ff421f696 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