Ignore:
Timestamp:
Feb 5, 2011, 9:25:06 PM (14 years ago)
Author:
gav
Message:

Add some null checking to AssetService.getAssemblies and assetTreeCompact template.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/features/taskProcedureRework/grails-app/views/shared/_assetTreeCompact.gsp

    r780 r787  
     1
     2<%--  Fetch to prevent lazy initialization error.  --%>
     3<% assetInstance = Asset.read(assetInstance?.id)%>
    14
    25<div class="static_tree" >
    3     ${assetInstance.encodeAsHTML()}
     6    ${assetInstance?.encodeAsHTML()}
    47    <ul>
    5     <g:each var="assetSubItem1" in="${assetInstance.assetSubItems.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }">
     8    <g:each var="assetSubItem1" in="${assetInstance?.assetSubItems?.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }">
    69        <li>
    710            ${assetSubItem1?.encodeAsHTML()}
Note: See TracChangeset for help on using the changeset viewer.