Skip to content

Commit

Permalink
Raise appropriate exception if user forces non-ready collection as input
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Apr 18, 2024
1 parent 5addd00 commit 9a433ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 9a433ab

Please sign in to comment.