Skip to content

Commit

Permalink
HELP-15568 ensure document is saved in fax migration
Browse files Browse the repository at this point in the history
(cherry picked from commit 2301bfe)
  • Loading branch information
lazedo committed Mar 11, 2015
1 parent 1212a23 commit 4664b2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions applications/fax/src/fax_maintenance.erl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ maybe_migrate_private_media(AccountDb, JObj) ->
end.

migrate_private_media(AccountDb, Doc, <<"tiff">>) ->
_ = couch_mgr:save_doc(AccountDb, wh_json:set_value(<<"pvt_type">>, <<"fax">>, Doc)),
{'ok', _} = couch_mgr:ensure_saved(AccountDb, wh_json:set_value(<<"pvt_type">>, <<"fax">>, Doc)),
'ok';
migrate_private_media(_AccountDb, _JObj, _MediaType) -> 'ok'.

Expand Down Expand Up @@ -134,7 +134,7 @@ maybe_recover_private_media(AccountDb, JObj) ->
recover_private_media(_AccountDb, _Doc, <<"tiff">>) ->
'ok';
recover_private_media(AccountDb, Doc, _MediaType) ->
_ = couch_mgr:save_doc(AccountDb, wh_json:set_value(<<"pvt_type">>, <<"private_media">>, Doc)),
{'ok', _ } = couch_mgr:ensure_saved(AccountDb, wh_json:set_value(<<"pvt_type">>, <<"private_media">>, Doc)),
'ok'.

-spec migrate_faxes_to_modb(ne_binary(), wh_proplist()) -> 'ok'.
Expand Down

0 comments on commit 4664b2a

Please sign in to comment.