Skip to content

Commit

Permalink
Only set dataset.job if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Mar 7, 2024
1 parent 4a57547 commit b8df73d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,10 @@ def add_input_dataset(self, name, dataset=None, dataset_id=None):

def add_output_dataset(self, name, dataset):
joda = JobToOutputDatasetAssociation(name, dataset)
dataset.dataset.job = self
if dataset.dataset.job is None:
# Only set job if dataset doesn't already have associated job.
# database operation tools that make copies should not modify the job here.
dataset.dataset.job = self
add_object_to_object_session(self, joda)
self.output_datasets.append(joda)

Expand Down

0 comments on commit b8df73d

Please sign in to comment.