summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-06-24 17:38:42 -0700
committerAdam Kocoloski <adam@cloudant.com>2010-06-24 17:38:42 -0700
commit6dcb12c20d0dc06e4a536674da41cde77ea3965f (patch)
treee99b40c1172da7d74545ec903b43ba98060e3b41
parent096343af965c9f371c74e7fd9bd45bbe67f3470f (diff)
trivially reorder json props to pass list_views test
-rw-r--r--src/fabric_view.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fabric_view.erl b/src/fabric_view.erl
index 99cf1671..738bb7dd 100644
--- a/src/fabric_view.erl
+++ b/src/fabric_view.erl
@@ -174,11 +174,11 @@ transform_row(#view_row{key=Key, id=reduced, value=Value}) ->
transform_row(#view_row{key=Key, id=undefined}) ->
{row, {[{key,Key}, {error,not_found}]}};
transform_row(#view_row{key=Key, id=Id, value=Value, doc=undefined}) ->
- {row, {[{key,Key}, {id,Id}, {value,Value}]}};
+ {row, {[{id,Id}, {key,Key}, {value,Value}]}};
transform_row(#view_row{key=Key, id=Id, value=Value, doc={error,Reason}}) ->
- {row, {[{key,Key}, {id,Id}, {value,Value}, {error,Reason}]}};
+ {row, {[{id,Id}, {key,Key}, {value,Value}, {error,Reason}]}};
transform_row(#view_row{key=Key, id=Id, value=Value, doc=Doc}) ->
- {row, {[{key,Key}, {id,Id}, {value,Value}, {doc,Doc}]}}.
+ {row, {[{id,Id}, {key,Key}, {value,Value}, {doc,Doc}]}}.
sort_fun(fwd) ->
fun(A,A) -> true; (A,B) -> couch_view:less_json(A,B) end;