diff options
Diffstat (limited to 'share/www/script/couch_tests.js')
-rw-r--r-- | share/www/script/couch_tests.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index 802db6f8..255c0228 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -117,10 +117,16 @@ function run_on_modified_server(settings, fun) { // unset the settings for(var j=0; j < i; j++) { var s = settings[j]; - CouchDB.request("PUT", "/_config/" + s.section + "/" + s.key, { - body: s.oldValue, - headers: {"X-Couch-Persist": "false"} - }); + if(s.oldValue == "\"\"\n") { // unset value + CouchDB.request("DELETE", "/_config/" + s.section + "/" + s.key, { + headers: {"X-Couch-Persist": "false"} + }); + } else { + CouchDB.request("PUT", "/_config/" + s.section + "/" + s.key, { + body: s.oldValue, + headers: {"X-Couch-Persist": "false"} + }); + } } } } |