-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i16 Expand AssetDestroyer to also destroy AssetResources (#861)
* expand AssetDestroyer to also delete AssetResources * don't set validation status on deleted Asset Prevents the following error when deleting an AssetResource via the Valkyrie Transactions: `SolrDocument#get_members: undefined method 'members' for AssetResource` Setting the validation status required looking up the Asset's members recursively. But since we're in the middle of deleting things: 1. Expected data was missing, and more importantly, 2. We don't care about setting the Asset's validation status because it's being deleted * use transaction to thoroughly delete members The Transaction ensures the members will be deleted thoroughly. For example, using the transaction means all the related Sipity records will be destroyed, which is what we want * rescue and log error if AssetResource is not found * use dedicated logger instead of puts * ensure path to logger exists This should fix specs that are failing in CI
- Loading branch information
1 parent
92d73b2
commit 567d7b7
Showing
3 changed files
with
41 additions
and
10 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
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