From 81086bf2337c9b68557a11edf5ef5668ed5b4609 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 8 Mar 2024 12:03:48 +0100 Subject: [PATCH] Fix DataResult type None isn't valid for `List[Any]`. Fixes: ``` ValidationError 1 validation error for DataResult data Input should be a valid list [type=list_type, input_value=None, input_type=NoneType] For further information visit https://errors.pydantic.dev/2.5/v/list_type ``` --- lib/galaxy/webapps/galaxy/services/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/services/datasets.py b/lib/galaxy/webapps/galaxy/services/datasets.py index b1ab34f5cf13..0d1667a505d5 100644 --- a/lib/galaxy/webapps/galaxy/services/datasets.py +++ b/lib/galaxy/webapps/galaxy/services/datasets.py @@ -884,7 +884,7 @@ def _data( # If stats were requested, return them. if "stats" in kwargs: if stats["data"]["max"] == 0: - return DataResult(dataset_type=indexer.dataset_type, data=None) + return DataResult(dataset_type=indexer.dataset_type, data=[]) else: return stats