From 0000a60eb0710f54853bb580c34bd1232e2974dd Mon Sep 17 00:00:00 2001 From: Alok Saldanha Date: Sat, 2 Mar 2024 11:50:09 -0500 Subject: [PATCH] #73 hide annotation links when disabled --- cellxgene_gateway/filecrawl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cellxgene_gateway/filecrawl.py b/cellxgene_gateway/filecrawl.py index 21d8b02..60cd87b 100644 --- a/cellxgene_gateway/filecrawl.py +++ b/cellxgene_gateway/filecrawl.py @@ -10,12 +10,15 @@ import html import urllib.parse -from cellxgene_gateway import env, flask_util +from cellxgene_gateway import flask_util from cellxgene_gateway.cache_key import CacheKey from cellxgene_gateway.dir_util import annotations_suffix, make_annotations, make_h5ad +from cellxgene_gateway.env import enable_annotations def render_annotations(item, item_source): + if not enable_annotations: + return "" url = flask_util.view_url( item_source.get_annotations_subpath(item), item_source.name )