# 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 1275930847 14400
# Node ID 1ab9d6b0ddfc65bc6e58c77891c57ef99e1e12cb
# Parent f415eee0950c78ccf103bde9d4adc8a853e55a1e
Yet another fix fo creating the history link on the library dataset information page -
since it is possible to have an hda that does not have an associated history, we need to
handle it.
--- a/templates/library/common/ldda_info.mako
+++ b/templates/library/common/ldda_info.mako
@@ -149,20 +149,17 @@
%for hda in associated_hdas:
<tr><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>
+ %if hda.history:
+ <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>
%else:
- error getting history
+ no history
%endif
</td><td>${hda.get_display_name()}</td><td>${time_ago(
hda.update_time )}</td><td>
- %if hda_hist and hda_hist.user:
- ${hda_hist.user.email}
+ %if hda.history and hda.history.user:
+ ${hda.history.user.email}
%else:
anonymous
%endif