Skip to content

Commit

Permalink
Correct types in JobToInputDatasetAssociation (optional/nullable)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Apr 11, 2024
1 parent e26c9f5 commit 2901b7c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2310,14 +2310,12 @@ class JobToInputDatasetAssociation(Base, RepresentById):
__tablename__ = "job_to_input_dataset"

id: Mapped[int] = mapped_column(primary_key=True)
job_id: Mapped[Optional[int]] = mapped_column(ForeignKey("job.id"), index=True)
dataset_id: Mapped[Optional[int]] = mapped_column(ForeignKey("history_dataset_association.id"), index=True)
job_id: Mapped[int] = mapped_column(ForeignKey("job.id"), index=True, nullable=True)
dataset_id: Mapped[int] = mapped_column(ForeignKey("history_dataset_association.id"), index=True, nullable=True)
dataset_version: Mapped[Optional[int]]
name: Mapped[Optional[str]] = mapped_column(String(255))
dataset: Mapped[Optional["HistoryDatasetAssociation"]] = relationship(
lazy="joined", back_populates="dependent_jobs"
)
job: Mapped[Optional["Job"]] = relationship(back_populates="input_datasets")
dataset: Mapped["HistoryDatasetAssociation"] = relationship(lazy="joined", back_populates="dependent_jobs")
job: Mapped["Job"] = relationship(back_populates="input_datasets")

def __init__(self, name, dataset):
self.name = name
Expand Down

0 comments on commit 2901b7c

Please sign in to comment.