Check if thing.childlisting is falsy before including it

This fixes bold `False`s showing up in the `.json-html`
and `.json-compact` renderstyles. Apparently been an issue for
5 years, but it was only noticed now.
This commit is contained in:
Jordan Milne
2015-01-09 20:20:53 -04:00
parent 034e267b45
commit cfd3a1cf1a
4 changed files with 12 additions and 3 deletions

View File

@@ -107,5 +107,8 @@
%else:
<div class="child">
%endif
${thing.childlisting}</div>
%if thing.childlisting:
${thing.childlisting}
%endif
</div>
</div>

View File

@@ -129,7 +129,9 @@ ${parent.midcol(cls = cls)}
%else:
<div class="child">
%endif
%if thing.childlisting:
${thing.childlisting}
%endif
</div>
</%def>

View File

@@ -95,7 +95,9 @@
</div>
<div style="clear: both;"></div>
<div class="child">
${thing.childlisting}
%if thing.childlisting:
${thing.childlisting}
%endif
</div>
</div>

View File

@@ -190,7 +190,9 @@ ${self.RenderPrintable()}
<%def name="Child(display=True)">
<div class="child" ${(not display and "style='display:none'" or "")}>
${thing.childlisting}
%if thing.childlisting:
${thing.childlisting}
%endif
</div>
</%def>