do not fail on missing author or related document

This commit is contained in:
Frédéric Péters 2014-02-28 12:42:24 +01:00
parent 33206b37d7
commit 395dcca1fd
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@
<label>Auteurs</label>
<div>
<ul>
<li tal:repeat="author context/authors"><a tal:attributes="href author/to_object/absolute_url" tal:content="author/to_object/Title">Céline Delforge</a></li>
<li tal:repeat="author context/authors"><a tal:condition="author/to_object" tal:attributes="href author/to_object/absolute_url" tal:content="author/to_object/Title">Céline Delforge</a></li>
</ul>
</div>
</div>
@ -119,7 +119,7 @@
<div id="results">
<ul>
<tal:entry tal:repeat="object view/related_docs">
<li tal:define="oddrow repeat/object/odd" tal:attributes="class python: oddrow and 'odd' or 'even'"><div>
<li tal:define="oddrow repeat/object/odd" tal:condition="object" tal:attributes="class python: oddrow and 'odd' or 'even'"><div>
<h4><a href="#" tal:attributes="href object/absolute_url" tal:content="object/reftitle">Véronique Salvi</a></h4>
<p class="intitule" tal:content="object/Title"/>
<p class="authors" tal:content="python: object.get_authors_as_string()" tal:condition="python: object.authors" />