-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rake task to fix assets that are not deleted in WH
On the back of an investigation into asset deletion states, we've produced a set of assets that are not deleted in wh, but should not be live. In order to preserve some data integrity, we're choosing to fix the data, rather than do a mass deletion. We've identified some flows where draft replacements should be deleted. Nonetheless, the original asset does not redirect to a replacement if the replacement is in draft, so we're also switching the draft state to false. The order is important, as the replacements themselves would become public if we don't action the deletion first. We're checking whether each asset that we feed through the rake task is itself or has a replacement in this state. For assets that are not draft replacements nor have draft replacements, we want to allow them to continue redirecting, being replaced etc. A final catch-all step ensures remaining assets (for which the steps above don't fire) are deleted. We've also identified broken flows that cause missing replacement links, but those will be fixed by running some updater logic from a wh rake task.
- Loading branch information
1 parent
6636d85
commit 2302ab2
Showing
2 changed files
with
280 additions
and
0 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