From c8c79dbfd315acd3614a0be128566b99956296cd Mon Sep 17 00:00:00 2001 From: Loic Baron Date: Thu, 5 Jun 2014 14:49:16 +0200 Subject: [PATCH] manifoldapi: handle multiple keys --- manifoldapi/static/js/manifold.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/manifoldapi/static/js/manifold.js b/manifoldapi/static/js/manifold.js index f0bbc8a6..fa5415a8 100644 --- 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; - if (key.length > 1) - continue; - key = key[0]; 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(); -- 2.43.0