This ejson_body requirement is tedious and pervasive.
authorRobert Newson <rnewson@apache.org>
Mon, 23 Dec 2013 23:09:28 +0000 (23:09 +0000)
committerPaul J. Davis <paul.joseph.davis@gmail.com>
Fri, 17 Jan 2014 21:41:21 +0000 (13:41 -0800)
src/ddoc_cache.erl
src/ddoc_cache_opener.erl

index 685a368..e862667 100644 (file)
@@ -78,4 +78,4 @@ recover({DbName, validation_funs}) ->
     end, DDocs),
     {ok, Funs};
 recover({DbName, DDocId}) ->
-    fabric:open_doc(DbName, DDocId, []).
+    fabric:open_doc(DbName, DDocId, [ejson_body]).
index e7abc9d..68b9127 100644 (file)
@@ -178,7 +178,7 @@ open_ddoc({DbName, validation_funs}=Key) ->
     ok = ets_lru:insert(ddoc_cache_lru, {DbName, validation_funs}, Funs),
     exit({open_ok, Key, {ok, Funs}});
 open_ddoc({DbName, DDocId}=Key) ->
-    try fabric:open_doc(DbName, DDocId, []) of
+    try fabric:open_doc(DbName, DDocId, [ejson_body]) of
         {ok, Doc} ->
             ok = ets_lru:insert(ddoc_cache_lru, {DbName, DDocId}, Doc),
             exit({open_ok, Key, {ok, Doc}});