Skip to content

Commit

Permalink
Simplify determine_output_format
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Jan 10, 2025
1 parent f65b754 commit 20dc7b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7019,7 +7019,7 @@ class HistoryDatasetCollectionAssociation(
create_time: Mapped[datetime] = mapped_column(default=now, nullable=True)
update_time: Mapped[datetime] = mapped_column(default=now, onupdate=now, index=True, nullable=True)

collection = relationship("DatasetCollection")
collection: Mapped["DatasetCollection"] = relationship("DatasetCollection")
history: Mapped[Optional["History"]] = relationship(back_populates="dataset_collections")

copied_from_history_dataset_collection_association = relationship(
Expand Down
7 changes: 4 additions & 3 deletions lib/galaxy/tools/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import re
from abc import abstractmethod
from collections import UserDict
from json import dumps
from typing import (
Any,
Expand Down Expand Up @@ -533,7 +534,7 @@ def handle_output(name, output, hidden=None):
output,
wrapped_params.params,
inp_data,
inp_dataset_collections,
input_collections,
input_ext,
python_template_version=tool.python_template_version,
execution_cache=execution_cache,
Expand Down Expand Up @@ -1156,7 +1157,7 @@ def determine_output_format(
output: "ToolOutput",
parameter_context,
input_datasets,
input_dataset_collections,
input_dataset_collections: UserDict[str, model.HistoryDatasetCollectionAssociation],
random_input_ext,
python_template_version="3",
execution_cache=None,
Expand Down Expand Up @@ -1198,7 +1199,7 @@ def determine_output_format(

if collection_name in input_dataset_collections:
try:
input_collection = input_dataset_collections[collection_name][0][0]
input_collection = input_dataset_collections[collection_name]
input_collection_collection = input_collection.collection
if element_index is None:
# just pick the first HDA
Expand Down

0 comments on commit 20dc7b7

Please sign in to comment.