From 6b390acb4dd7f28a6752b32840e221e410690a73 Mon Sep 17 00:00:00 2001 From: Robbie Court Date: Mon, 29 Jun 2026 14:26:59 +0000 Subject: [PATCH 1/2] Only attach ListAllAvailableImages to anatomy Class terms (not DataSets/Individuals with images) --- src/vfbquery/vfb_queries.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/vfbquery/vfb_queries.py b/src/vfbquery/vfb_queries.py index 909c348..de38f0d 100644 --- a/src/vfbquery/vfb_queries.py +++ b/src/vfbquery/vfb_queries.py @@ -820,9 +820,14 @@ def term_info_parse_object(results, short_form): if termInfo["IsIndividual"] and techniques: termInfo["Technique"].extend(techniques) termInfo["Technique"] = sorted(list(set(termInfo["Technique"]))) - # add a query to `queries` list for listing all available images - q = ListAllAvailableImages_to_schema(termInfo["Name"], {"short_form":vfbTerm.term.core.short_form}) - queries.append(q) + # add a query for listing all available images -- only for anatomy + # Class terms (get_instances expects a Class, per this query's own + # Class+Anatomy criteria). DataSets/Individuals that merely have + # images must not get it (they use DatasetImages etc.), otherwise a + # dataset shows a spurious "List all available images" query. + if contains_all_tags(termInfo["SuperTypes"], ["Class", "Anatomy"]): + q = ListAllAvailableImages_to_schema(termInfo["Name"], {"short_form":vfbTerm.term.core.short_form}) + queries.append(q) # If the term has channel images but not anatomy channel images, create thumbnails from channel images. if vfbTerm.channel_image and len(vfbTerm.channel_image) > 0: From c81efb9b6cdcaa2e1d978ad3d4d445b778984ea3 Mon Sep 17 00:00:00 2001 From: Robbie Court Date: Mon, 29 Jun 2026 14:27:29 +0000 Subject: [PATCH 2/2] Bump version to 1.22.9 --- src/vfbquery/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vfbquery/_version.py b/src/vfbquery/_version.py index 7bd58b2..fa7012a 100644 --- a/src/vfbquery/_version.py +++ b/src/vfbquery/_version.py @@ -6,4 +6,4 @@ cache's version stamp can never drift apart. """ -__version__ = "1.22.8" +__version__ = "1.22.9"