rnewson commented on a change in pull request #1656: Partition review fixes
URL: https://github.com/apache/couchdb/pull/1656#discussion_r227451310
 
 

 ##########
 File path: src/chttpd/src/chttpd_view.erl
 ##########
 @@ -147,12 +147,12 @@ handle_partition_view_req(Req, _Db, _DDoc, _Pk) ->
 
 check_partition_restrictions(#mrargs{} = Args) ->
     Restrictions = [
-        {<<"include_docs">>, Args#mrargs.include_docs, true},
-        {<<"stable">>, Args#mrargs.stable, true},
-        {<<"conflicts">>, Args#mrargs.conflicts, true}
+        {<<"include_docs">>, Args#mrargs.include_docs},
+        {<<"stable">>, Args#mrargs.stable},
+        {<<"conflicts">>, Args#mrargs.conflicts}
     ],
-    lists:foreach(fun ({Param, Field, Value}) ->
-        case Field =:= Value of
+    lists:foreach(fun ({Param, ArgValue}) ->
+        case ArgValue =:= true of
 
 Review comment:
   just say `case ArgValue of` since we match `true` below, and change the 
`false` below to `_`. Either that or use two clauses and match in the head.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to