Repository: couchdb-fabric Updated Branches: refs/heads/master a7cb8fd3e -> 47e5236b2
Handle case in fake_db where there's no user context Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/47e5236b Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/47e5236b Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/47e5236b Branch: refs/heads/master Commit: 47e5236b2e623d93c75ee191fd26f7586664df8f Parents: a7cb8fd Author: Robert Newson <[email protected]> Authored: Thu Apr 9 17:50:54 2015 +0100 Committer: Robert Newson <[email protected]> Committed: Thu Apr 9 17:50:54 2015 +0100 ---------------------------------------------------------------------- src/fabric_doc_update.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/47e5236b/src/fabric_doc_update.erl ---------------------------------------------------------------------- diff --git a/src/fabric_doc_update.erl b/src/fabric_doc_update.erl index ad7d752..8033415 100644 --- a/src/fabric_doc_update.erl +++ b/src/fabric_doc_update.erl @@ -122,7 +122,7 @@ path_ends_with(Path, Suffix) -> Suffix == lists:last(binary:split(mem3:dbname(Path), <<"/">>, [global])). fake_db(Opts) -> - {user_ctx, UserCtx} = lists:keyfind(user_ctx, 1, Opts), + UserCtx = couch_util:get_value(user_ctx, Opts, #user_ctx{}), #db{user_ctx = UserCtx}. tag_docs([]) ->
