git://git.onelab.eu
/
unfold.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
77076ce
)
manifoldapi: handle multiple keys
author
Loic Baron
<loic.baron@lip6.fr>
Thu, 5 Jun 2014 12:49:16 +0000
(14:49 +0200)
committer
Loic Baron
<loic.baron@lip6.fr>
Thu, 5 Jun 2014 12:49:16 +0000
(14:49 +0200)
manifoldapi/static/js/manifold.js
patch
|
blob
|
history
diff --git
a/manifoldapi/static/js/manifold.js
b/manifoldapi/static/js/manifold.js
index
f0bbc8a
..
fa5415a
100644
(file)
--- a/
manifoldapi/static/js/manifold.js
+++ b/
manifoldapi/static/js/manifold.js
@@
-475,15
+475,18
@@
var manifold = {
var key = manifold.metadata.get_key(method);
if (!key)
continue;
var key = manifold.metadata.get_key(method);
if (!key)
continue;
- if (key.length > 1)
- continue;
- key = key[0];
var sq_keys = [];
var subrecords = record[method];
if (!subrecords)
continue
$.each(subrecords, function (i, subrecord) {
var sq_keys = [];
var subrecords = record[method];
if (!subrecords)
continue
$.each(subrecords, function (i, subrecord) {
- sq_keys.push(subrecord[key]);
+ if (key.length == 1){
+ key = key[0];
+ sq_keys.push(subrecord[key]);
+ }else{
+ // more than what's necessary, but should work
+ sq_keys.push(subrecord);
+ }
});
update_query.params[method] = sq_keys;
update_query_orig.params[method] = sq_keys.slice();
});
update_query.params[method] = sq_keys;
update_query_orig.params[method] = sq_keys.slice();