Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/galaxy/tools/parameters/dataset_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def hdca_match(self, history_dataset_collection_association):
def dataset_collection_match(self, dataset_collection):
# If dataset collection not yet populated, cannot determine if it
# would be a valid match for this parameter.
if not dataset_collection.populated:
if not dataset_collection.populated_optimized:
return False

valid = True
Expand Down
2 changes: 2 additions & 0 deletions lib/galaxy/tools/parameters/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ def __expand_collection_parameter(trans, input_key, incoming_val, collections_to
subcollection_type = None
hdc_id = trans.app.security.decode_id(encoded_hdc_id)
hdc = trans.sa_session.get(HistoryDatasetCollectionAssociation, hdc_id)
if not hdc.collection.populated_optimized:
raise exceptions.ToolInputsNotReadyException("An input collection is not populated.")
collections_to_match.add(input_key, hdc, subcollection_type=subcollection_type, linked=linked)
if subcollection_type is not None:
subcollection_elements = subcollections.split_dataset_collection_instance(hdc, subcollection_type)
Expand Down
5 changes: 2 additions & 3 deletions lib/galaxy_test/api/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1659,9 +1659,8 @@ def test_map_over_collection(self, history_id):

@skip_without_tool("cat1")
def test_map_over_empty_collection(self, history_id):
hdca_id = self.dataset_collection_populator.create_list_in_history(history_id, contents=[]).json()["outputs"][
0
]["id"]
response = self.dataset_collection_populator.create_list_in_history(history_id, contents=[], wait=True).json()
hdca_id = response["output_collections"][0]["id"]
inputs = {
"input1": {"batch": True, "values": [{"src": "hdca", "id": hdca_id}]},
}
Expand Down