Github user kxepal commented on a diff in the pull request:
https://github.com/apache/couchdb-chttpd/pull/82#discussion_r41984976
--- Diff: src/chttpd_db.erl ---
@@ -733,7 +741,17 @@ db_doc_req(#httpd{method='POST', user_ctx=Ctx}=Req,
Db, DocId) ->
NewDoc = Doc#doc{
atts = UpdatedAtts ++ OldAtts2
},
- case fabric:update_doc(Db, NewDoc, Options) of
+ couch_log:debug("chttpd_db: couchNew doc formed including new att:
formed",[]),
+ lists:foreach(fun(X) -> couch_log:debug("~p~n
~p~n",[couch_att:fetch(data, X), couch_att:fetch(name, X)]) end,
NewDoc#doc.atts),
+ couch_log:debug("chttpd_db: going to call attachment handler for
base64 attachments",[]),
+ case fabric_attachments_handler:externalize_att(Db) of
+ "true" ->
+ NewNewDoc = fabric_attachments_handler:inline_att_store(Db,
NewDoc); %store_single_document
+ "false" ->
+ couch_log:debug("Store inline attachmets in Swift
disabled",[]),
+ NewNewDoc = NewDoc
--- End diff --
Better not assign variable in case, but assign case result to variable.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---