Skip to content

Commit

Permalink
Fix a bug in find_orphans.py, related to #752.
Browse files Browse the repository at this point in the history
  • Loading branch information
donkirkby committed Jan 29, 2020
1 parent 94a2116 commit ac2c1a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kive/librarian/management/commands/find_orphans.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def remove_orphans(orphans, delete_all=True, delete_files=True, delete_records=T
for orphan in orphans:
print('For orphan "{}"'.format(orphan.id))
if delete_all or delete_files:
print('Deleting file "{}"'.format(orphan.dataset_file.path))
try:
print('Deleting file "{}"'.format(orphan.dataset_file.path))
orphan.dataset_file.delete()
except ValueError:
print('File has already been deleted')
Expand Down

0 comments on commit ac2c1a5

Please sign in to comment.