# HG changeset patch --
Bitbucket.org
# Project galaxy-dist
# URL
http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1275929498 14400
# Node ID f415eee0950c78ccf103bde9d4adc8a853e55a1e
# Parent ada54c10540ae10f308a1f2e8683bcbe779057f1
Being extremely cautious when displaying history atibutes associated with an hda in the
library dataset info page.
--- a/templates/library/common/ldda_info.mako
+++ b/templates/library/common/ldda_info.mako
@@ -148,12 +148,21 @@
</thead>
%for hda in associated_hdas:
<tr>
- <td><a target="_blank" href="${h.url_for(
controller='history', action='view', id=trans.security.encode_id(
hda.history_id ) )}">${hda.history.get_display_name()}</a></td>
+ <td>
+ <%
+ hda_hist = trans.sa_session.query( trans.model.History
).get( hda.history_id )
+ %>
+ %if hda_hist:
+ <a target="_blank" href="${h.url_for(
controller='history', action='view', id=trans.security.encode_id(
hda_hist.id ) )}">${hda_hist.get_display_name()}</a>
+ %else:
+ error getting history
+ %endif
+
</td><td>${hda.get_display_name()}</td><td>${time_ago(
hda.update_time )}</td><td>
- %if hda.history.user:
- ${hda.history.user.email}
+ %if hda_hist and hda_hist.user:
+ ${hda_hist.user.email}
%else:
anonymous
%endif