diff --git a/lib/galaxy/managers/hdas.py b/lib/galaxy/managers/hdas.py index 2f71fe37cc7..931f167b63f 100644 --- a/lib/galaxy/managers/hdas.py +++ b/lib/galaxy/managers/hdas.py @@ -327,7 +327,7 @@ class HDASerializer( # datasets._UnflattenedMetadataDatasetAssociationSerialize 'file_path' : self._remap_from( 'file_name' ), 'resubmitted' : lambda i, k, **c: self.hda_manager.has_been_resubmitted( i ), - 'creating_job' : lambda i, k, **c: self.app.security.encode_id(i.creating_job.id), + 'creating_job' : self.serialize_creating_job, 'display_apps' : self.serialize_display_apps, 'display_types' : self.serialize_old_display_applications, @@ -433,6 +433,12 @@ class HDASerializer( # datasets._UnflattenedMetadataDatasetAssociationSerialize } return urls + def serialize_creating_job( self, hda, key, **context ): + if hda.creating_job: + self.app.security.encode_id(hda.creating_job.id), + else: + return None + class HDADeserializer( datasets.DatasetAssociationDeserializer, taggable.TaggableDeserializerMixin, diff --git a/lib/galaxy/webapps/galaxy/api/jobs.py b/lib/galaxy/webapps/galaxy/api/jobs.py index fe3b35d9959..a7b8f64203b 100644 --- a/lib/galaxy/webapps/galaxy/api/jobs.py +++ b/lib/galaxy/webapps/galaxy/api/jobs.py @@ -190,7 +190,7 @@ class JobController( BaseAPIController, UsesLibraryMixinItems ): def build_for_rerun( self, trans, id, **kwd ): """ * GET /api/jobs/{job_id}/build_for_rerun - returns a tool input/param template preopoulated with this job's + returns a tool input/param template prepopulated with this job's information, suitable for rerunning or rendering parameters of the job.