Skip to content

Commit 0c3a478

Browse files
committed
Fix logos on iviewer placeholder page via base_url
1 parent 15c3396 commit 0c3a478

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

idr_gallery/views.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ def image_viewer(request, iid, conn=None, **kwargs):
570570
# "mkngff" data is at https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/pages/idr_ngff_data.html
571571
bia_ngff_id = img_path.split(BIA_URL, 1)[-1].split("/", 1)[0]
572572

573+
if settings.BASE_URL is not None:
574+
base_url = settings.BASE_URL
575+
else:
576+
base_url = request.build_absolute_uri(reverse('index'))
577+
573578
rsp_json = {
574579
"idr_study": idrid_name,
575580
"template": "idr_gallery/archived_image.html",
@@ -582,6 +587,7 @@ def image_viewer(request, iid, conn=None, **kwargs):
582587
"is_zarr": is_zarr,
583588
"download_url": download_url,
584589
"bia_ngff_id": bia_ngff_id,
590+
"base_url": base_url,
585591
}
586592
if image.fileset is not None:
587593
paths = image.getImportedImageFilePaths()

0 commit comments

Comments
 (0)