Skip to content

Commit

Permalink
commands.edit.remove:remove_children - remove children of master file…
Browse files Browse the repository at this point in the history
…s before removing the files themselves
  • Loading branch information
MatteoCampinoti94 committed Dec 16, 2024
1 parent 247f6ee commit 0f0fdbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion digiarch/commands/edit/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def remove_children(
) -> None:
if isinstance(file, OriginalFile):
for child in db.master_files.select({"original_uuid": str(file.uuid)}):
remove_child(ctx, avid, db, db.master_files, child, "master", *loggers, log_removal=log_removal)
remove_children(ctx, avid, db, child, *loggers, log_removal=log_removal)
remove_child(ctx, avid, db, db.master_files, child, "master", *loggers, log_removal=log_removal)
elif isinstance(file, MasterFile):
for child in db.access_files.select({"original_uuid": str(file.uuid)}):
remove_child(ctx, avid, db, db.access_files, child, "access", *loggers, log_removal=log_removal)
Expand Down

0 comments on commit 0f0fdbb

Please sign in to comment.