Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Fedora record removal to DeletePhysicalInstantiations fix #925

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

afred
Copy link
Contributor

@afred afred commented Oct 1, 2024

No description provided.

@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch from 1e72e96 to 3bcb39e Compare October 31, 2024 17:49
@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch from 3bcb39e to c72ab04 Compare October 31, 2024 18:53
@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch from c72ab04 to e95c5b8 Compare November 1, 2024 17:57
@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch from e95c5b8 to ddaf04d Compare November 1, 2024 18:33
@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch 2 times, most recently from 027cfd9 to 7fbff53 Compare November 4, 2024 16:36
@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch from 7fbff53 to 54ee1e2 Compare November 4, 2024 18:45
@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch from 54ee1e2 to 5574158 Compare November 5, 2024 17:11
@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch 2 times, most recently from 26bd483 to 4010868 Compare November 5, 2024 18:20
Fedora records were not being deleted and were then being retreived by PhysicalInstantiationResource
models, effectively getting stuck on the parent Asset.

This allows the Fix::DeletePhysicalInstantiaton class to remove PhysicalInstantiations of a give
media type from a set of AssetResources identified by an ID list.

Usage

Includes class SampleData class for finding test data sets within an existing repository (e.g. demo).
@afred afred force-pushed the 854-more-more-more-delete-Fedora-hangers-on branch from 4010868 to 5f46e37 Compare November 7, 2024 15:21
@afred afred marked this pull request as ready for review November 7, 2024 15:48
@afred afred requested review from orangewolf and bkiahstroud and removed request for orangewolf November 7, 2024 15:49
Comment on lines +21 to +27
@members ||= []
member_id_vals = member_ids.map { |id| id.to_s }.to_set
ids_from_members = @members.map { |m| m.id.to_s }.to_set
# If the member_ids do not match the IDs within the members, then re-set the members to be an accurate reflection of the member IDs.
# This allows us to modify resource.member_ids and have #members accurately reflect the changes.
if member_id_vals != ids_from_members
@members = member_ids.map do |id|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain more about what's happening on these lines and why?

def destroy_work_and_members(resource:)
result = { resource: resource }
resource.members.each do |member|
resource.members.delete(member)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain the purpose of this line? (28)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants