Skip to content

Commit

Permalink
KAZOO-5801: remove _rev to avoid conflict during creating new docs (2…
Browse files Browse the repository at this point in the history
  • Loading branch information
icehess authored and jamesaimonetti committed Feb 6, 2018
1 parent 9fe5d68 commit 8f3ca32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ split_and_save_to_number_dbs(AccountDb, Results) ->
F = fun (JObj, M) ->
NewJObj = kz_json:get_value(<<"doc">>, JObj),
NumberDb = knm_converters:to_db(knm_converters:normalize(kz_doc:id(NewJObj))),
M#{NumberDb => [NewJObj | maps:get(NumberDb, M, [])]}
M#{NumberDb => [kz_doc:delete_revision(NewJObj) | maps:get(NumberDb, M, [])]}
end,
Map = lists:foldl(F, #{}, Results),
save_to_number_dbs(AccountDb, maps:to_list(Map), 1).
Expand Down

0 comments on commit 8f3ca32

Please sign in to comment.