*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 8f14076e authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Fix possible duplicate removal of list entries

parent 8508c7ce
No related branches found
No related tags found
1 merge request!2Modernization
...@@ -50,7 +50,7 @@ def get_orphaned_files(location): ...@@ -50,7 +50,7 @@ def get_orphaned_files(location):
# filter out those files that invenio has knowledge about # filter out those files that invenio has knowledge about
for bucket in location.buckets: for bucket in location.buckets:
for obj in bucket.objects: for obj in bucket.objects:
if obj.file: if obj.file and obj.file.uri in all_files:
# an object_version without attached file_instance # an object_version without attached file_instance
# likely denotes a soft-deleted file # likely denotes a soft-deleted file
all_files.remove(obj.file.uri) all_files.remove(obj.file.uri)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment