summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/node_modules/okview/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/node_modules/okview/index.js b/app/node_modules/okview/index.js
index 6eebe6e..2d1c0a0 100644
--- a/app/node_modules/okview/index.js
+++ b/app/node_modules/okview/index.js
@@ -159,10 +159,10 @@ function fetchTemplateData(meta, queries, id) {
// Inform template of ID in generic field
if (manyResult) {
result = result.map(function(data) {
- return assign({}, data, {id: data[resource.idField]})
+ return assign({}, data, {id: resource.getID(data)})
});
} else {
- result = assign({}, result, {id: result[resource.idField]});
+ result = assign({}, result, {id: resource.getID(result)});
}
// If we have a lot of results for a certain type,
// we pluralize the key and yield an array of results