commit/galaxy-central: jgoecks: Fix bug in packing track that is a library dataset
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/622fd4f0a437/ changeset: 622fd4f0a437 user: jgoecks date: 2012-06-14 22:57:09 summary: Fix bug in packing track that is a library dataset affected #: 1 file diff -r ea2fbfe6d9db5b9eac1830a7e9de1aea0dcf5806 -r 622fd4f0a437c897fea83e3e60eba5191f8548f5 lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -348,7 +348,7 @@ def get_library_dataset( self, trans, id, check_ownership=False, check_accessible=True ): return self.get_object( trans, id, 'LibraryDataset', check_ownership=False, check_accessible=check_accessible ) -class UsesVisualizationMixin( SharableItemSecurityMixin ): +class UsesVisualizationMixin( SharableItemSecurityMixin, UsesLibraryMixinItems ): """ Mixin for controllers that use Visualization objects. """ viz_types = [ "trackster", "circster" ] @@ -468,6 +468,10 @@ def pack_track( track_dict ): dataset_id = track_dict['dataset_id'] hda_ldda = track_dict.get('hda_ldda', 'hda') + if hda_ldda == 'ldda': + # HACK: need to encode library dataset ID because get_hda_or_ldda + # only works for encoded datasets. + dataset_id = trans.security.encode_id( dataset_id ) dataset = self.get_hda_or_ldda( trans, hda_ldda, dataset_id ) try: @@ -573,7 +577,7 @@ if hda_ldda == "hda": return self.get_dataset( trans, dataset_id, check_ownership=False, check_accessible=True ) else: - return trans.sa_session.query( trans.app.model.LibraryDatasetDatasetAssociation ).get( trans.security.decode_id( dataset_id ) ) + return self.get_library_dataset_dataset_association( trans, dataset_id ) # -- Helper functions -- Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket