mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-30 18:13:23 +08:00
Allow serialization of hdas without 'creating job', though we should probably look into how/why this can ever happen. Seems like there's a bug hidden here somewhere, but this allows the existing functionality to work and pass tests.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user