Skip to content

Commit

Permalink
bug: use deepcopy
Browse files Browse the repository at this point in the history
Co-authored-by: Zacharias Zacharodimos <[email protected]>
  • Loading branch information
carlinmack and zzacharo authored Nov 15, 2024
1 parent 38f5e94 commit 7c03d27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions invenio_rdm_records/services/pids/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

"""RDM PIDs Service tasks."""

from copy import copy
from copy import deepcopy

from celery import shared_task
from invenio_access.permissions import system_identity
Expand All @@ -31,6 +31,6 @@ def cleanup_parent_pids(recid):
"""Clean up parent PIDs."""
record_cls = current_rdm_records.records_service
record = record_cls.pid.resolve(recid)
parent_pids = copy(record.parent.get("pids", {}))
parent_pids = deepcopy(record.parent.get("pids", {}))
if record_cls.next_latest_published_record_by_parent(record.parent) is None:
record_cls.pids.parent_pid_manager.discard_all(parent_pids, soft_delete=True)

0 comments on commit 7c03d27

Please sign in to comment.