Unverified Commit 91660b9d authored by mvdbeek's avatar mvdbeek
Browse files

Fix target_type in auto-conversion context

which means we collect and store the converted dataset as the job input.

We don't need to wait for the galaxy.json collection, we know the exact
target type already. That fixes the retrieval in
`get_converted_files_by_type`.

I believe this was always the intention and is how it works if the
dataset already exists (i.e. on a re-run), and for all converters that
don't use galaxy.json The converter records the dataset that the user
chose, so there's no gap in the provenance either.

This somewhat addresses
https://github.com/galaxyproject/total-perspective-vortex/issues/141
so you can (reliably) differetiate your rules on the input datatype
and filesize combination.
parent 616fe39e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -847,7 +847,11 @@ class Data(metaclass=DataMeta):
        job, converted_datasets, *_ = converter.execute(
            trans, incoming=params, set_output_hid=visible, history=history, flush_job=False
        )
        # We should only have a single converted output, but let's be defensive here
        n_converted_datasets = len(converted_datasets)
        for converted_dataset in converted_datasets.values():
            if converted_dataset.extension == "auto" and n_converted_datasets == 1:
                converted_dataset.extension = target_type
            original_dataset.attach_implicitly_converted_dataset(trans.sa_session, converted_dataset, target_type)
        trans.app.job_manager.enqueue(job, tool=converter)
        if len(params) > 0: