commit/galaxy-central: dan: Use encoded HDA ID in dataset/errors.mako

1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/8af219b52f5e/ Changeset: 8af219b52f5e User: dan Date: 2014-03-28 20:52:08 Summary: Use encoded HDA ID in dataset/errors.mako Affected #: 2 files diff -r b1110a8e67c3b93da294eb3068d04b9249d914a9 -r 8af219b52f5ed11cccac4d49cb35ce71441cb91b lib/galaxy/tools/errors.py --- a/lib/galaxy/tools/errors.py +++ b/lib/galaxy/tools/errors.py @@ -53,10 +53,12 @@ # Get the dataset sa_session = app.model.context if not isinstance( hda, model.HistoryDatasetAssociation ): + hda_id = hda try: - hda = sa_session.query( model.HistoryDatasetAssociation ).get( hda ) + hda = sa_session.query( model.HistoryDatasetAssociation ).get( hda_id ) + assert hda is not None, ValueError( "No HDA yet" ) except: - hda = sa_session.query( model.HistoryDatasetAssociation ).get( app.security.decode_id( hda ) ) + hda = sa_session.query( model.HistoryDatasetAssociation ).get( app.security.decode_id( hda_id ) ) assert isinstance( hda, model.HistoryDatasetAssociation ), ValueError( "Bad value provided for HDA (%s)." % ( hda ) ) self.hda = hda # Get the associated job diff -r b1110a8e67c3b93da294eb3068d04b9249d914a9 -r 8af219b52f5ed11cccac4d49cb35ce71441cb91b templates/webapps/galaxy/dataset/errors.mako --- a/templates/webapps/galaxy/dataset/errors.mako +++ b/templates/webapps/galaxy/dataset/errors.mako @@ -61,7 +61,7 @@ <div class="toolFormTitle">Error Report</div><div class="toolFormBody"><form name="report_error" action="${h.url_for(controller='dataset', action='report_error')}" method="post" > - <input type="hidden" name="id" value="${hda.id}" /> + <input type="hidden" name="id" value="${trans.security.encode_id( hda.id)}" /><div class="form-row"><label>Your email</label><input type="text" name="email" size="40" value="${user_email}" /> 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)
-
commits-noreply@bitbucket.org