diff --git a/openatlas/views/admin.py b/openatlas/views/admin.py index f8d342c13..29e6398b3 100644 --- a/openatlas/views/admin.py +++ b/openatlas/views/admin.py @@ -825,11 +825,10 @@ def count_files_to_convert() -> int: total_files = 0 converted_files = 0 existing_files = [entity.id for entity in Entity.get_by_class('file')] - for file_id, file_path in g.files.items(): - if (file_id in existing_files and - file_path.suffix in g.display_file_ext): + for id_, path in g.files.items(): + if id_ in existing_files and path.suffix in g.display_file_ext: total_files += 1 - if check_iiif_file_exist(file_id): + if check_iiif_file_exist(id_): converted_files += 1 return total_files - converted_files