Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Possibly fix Riak search, again

  • Loading branch information...
commit 7785715aac456c9239aa46d0806fce21571d1c39 1 parent 1023ef7
Evan Miller authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/db_adapters/boss_db_adapter_riak.erl
5 src/db_adapters/boss_db_adapter_riak.erl
View
@@ -112,13 +112,12 @@ save_record(Conn, Record) ->
string:join(Tail, "-")
end,
BinKey = list_to_binary(Key),
- BinVal = term_to_binary(PropList),
ok = case riakc_pb_socket:get(Conn, Bucket, BinKey) of
{ok, O} ->
- O2 = riakc_obj:update_value(O, BinVal),
+ O2 = riakc_obj:update_value(O, PropList),
riakc_pb_socket:put(Conn, O2);
{error, _} ->
- O = riakc_obj:new(Bucket, BinKey, BinVal),
+ O = riakc_obj:new(Bucket, BinKey, PropList, <<"application/x-erlang-term">>),
riakc_pb_socket:put(Conn, O)
end,
{ok, Record:set(id, lists:concat([Type, "-", Key]))}.
Please sign in to comment.
Something went wrong with that request. Please try again.