Skip to content

Commit

Permalink
fixed 500 if iiif path is set but not available
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardKoschicek committed Apr 20, 2024
1 parent b97cc88 commit a842746
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openatlas/views/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
from openatlas.display.tab import Tab
from openatlas.display.table import Table
from openatlas.display.util import (
button, check_iiif_file_exist, display_info, get_file_path, link,
button, check_iiif_activation, check_iiif_file_exist, display_info,
get_file_path, link,
required_group, send_mail)
from openatlas.display.util2 import (
convert_size, format_date, is_authorized, manual, sanitize, uc_first)
Expand Down Expand Up @@ -546,7 +547,7 @@ def orphans() -> str:
if is_authorized('editor') else ''])

# Orphaned IIIF files with no corresponding entity
if g.settings['iiif'] and g.settings['iiif_path']:
if check_iiif_activation():
for file in Path(g.settings['iiif_path']).iterdir():
confirm = _('Delete %(name)s?', name=file.name.replace("'", ''))
if file.name != '.gitignore' \
Expand Down

0 comments on commit a842746

Please sign in to comment.