Commands: fix remap_user_ids
and add map_cantus_ids
#1662
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
"Fixes"
remap_user_ids
command by:iterator
QuerySet method to manage memory useFixes is in scare quotes because I'm not 100% sure what the original issue was, but given the length of time the previous version had to run, I suspect something failed halfway through and because they were not contained in a transaction (as they now will be with the "reversion") the halfway-done mapping was not rolled back.
Adds the `map_cantus_ids" command which can be used to bulk-change one Cantus ID to another. As noted in the command docstring, this is a potentially temporary command that is (at this point) only going to be used for #1661, since this functionality should be taken care of by a functioning Cantus ID merge process.
#1661 should be closed once this is run on production with the appropriate Cantus ID arguments.
#1165 and #1657 should be closed once this is run in production.