Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 26, 2024
1 parent 59b71d6 commit 74ed485
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions omeroweb/webclient/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1848,16 +1848,17 @@ def load_metadata_preview(request, c_type, c_id, conn=None, share_id=None, **kwa
size_x = manager.image.getSizeX()
size_y = manager.image.getSizeY()

base_url = reverse('webindex')
base_url = reverse("webindex")
big_image = (size_x * size_y) > (max_w * max_h)
if not big_image:
# if we have omero_web_zarr installed and s3 data is available, we
# use that as data source for viewer via /zarr/render_image etc.
try:
from omero_web_zarr.views import get_zarr_s3_path

zarr_path = get_zarr_s3_path(conn, manager.image.id)
if zarr_path is not None and zarr_path.startswith("http"):
base_url = reverse('omero_web_zarr_index')
base_url = reverse("omero_web_zarr_index")
except ImportError:
pass
context["base_url"] = base_url
Expand Down

0 comments on commit 74ed485

Please sign in to comment.