-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4.3] SUPP-33: fix import/delete rates (#6677)
* fix kzd_rates accessors return empty binary Tasks app CSV has empty binary for all fields that are missing from uploaded CSV. This will cause kzd_rates to always return empty string and doc save with them in db. This will make sure all accessros has correct type ne_binary and handle situation when the value is empty binary so we save a clean JSON in db. * try to update rate doc on conflict When a user deletes the rates from ratedeck db, it is soft deleted by default. This commit will try to update and ensure save the doc even if it is deleted. * fix import/delete rates task During testing the rate import and delete tasks for SUPP-33, some errors were found. * fix import where ratedeck database was incorrectly formatted (like `ratedeck/`) because of `ratedeck_id` being an empty binary from CSV * fix delete returning result which causing crashes in `kt_task_worker` * in delete, group objects by db, also add better logging * convert import state to map * make a clean json to save to db: CSV missing fields are empty binary. Together with changes in kzd_rates make sure we are generating a clean JSON to be saved to db. * edoc * ensure update doc on soft deleted and pvt_deleted open_doc will ignore if pvt_deleted so update_doc will result in conflict again. Adding option to allow pvt_deleted doc. Also remove any previous pvt_deleted from doc on conflict save * allow to open soft-deleted crossbar if requested in options, always remove pvt_deleted * merge with old doc when uploading CSV * bulk merge docs in kt_rates * routes is binary
- Loading branch information
Showing
5 changed files
with
438 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.