1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/b6ae7b6283c3/ Changeset: b6ae7b6283c3 User: natefoo Date: 2014-08-18 21:25:29 Summary: Adjust resubmitted state in get_hda_dict rather than in multiple places further down. Affected #: 2 files diff -r 4637dfed79d37c05e3caa3e0d4d5b1d44f892904 -r b6ae7b6283c30bcb58e87003066102bfa5af5e11 lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -800,6 +800,12 @@ history_id = trans.security.encode_id( hda.history.id ), history_content_id = trans.security.encode_id( hda.id ) ) + # resubmitted is not a real state + hda_dict[ 'resubmitted' ] = False + if hda.state == trans.app.model.Dataset.states.RESUBMITTED: + hda_dict[ 'state' ] = hda.dataset.state + hda_dict[ 'resubmitted' ] = True + # indeces, assoc. metadata files, etc. meta_files = [] for meta_type in hda.metadata.spec.keys(): diff -r 4637dfed79d37c05e3caa3e0d4d5b1d44f892904 -r b6ae7b6283c30bcb58e87003066102bfa5af5e11 lib/galaxy/webapps/galaxy/api/history_contents.py --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -132,15 +132,12 @@ api_type = "file" encoded_id = trans.security.encode_id( hda.id ) # TODO: handle failed_metadata here as well - state = hda.state - if state == trans.app.model.Dataset.states.RESUBMITTED: - state = hda.dataset.state return { 'id' : encoded_id, 'history_id' : encoded_history_id, 'name' : hda.name, 'type' : api_type, - 'state' : state, + 'state' : hda.dataset.state, 'deleted': hda.deleted, 'visible': hda.visible, 'purged': hda.purged, @@ -162,9 +159,6 @@ hda_dict = self.get_hda_dict( trans, hda ) hda_dict[ 'display_types' ] = self.get_old_display_applications( trans, hda ) hda_dict[ 'display_apps' ] = self.get_display_apps( trans, hda ) - if hda_dict[ 'state' ] == trans.app.model.Dataset.states.RESUBMITTED: - hda_dict[ 'state' ] = hda.dataset.state - hda_dict[ 'resubmitted' ] = True return hda_dict except Exception, exc: # catch error here - returning a briefer hda_dict with an error attribute 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.