HamlPy icon indicating copy to clipboard operation
HamlPy copied to clipboard

"or" statement does not work as expected in "if" tests

Open hoh opened this issue 11 years ago • 0 comments

Testing for the empty value of two Django variables fails when using the HAML syntax but works with the Django templating syntax.

This failed:

-if myobject.attr1 or myobject.attr2
    %div foobar

This worked:

{% if myobject.attr1 or myobject.attr2 %}
    %div foobar
{% endif %}

Using hamlpy==0.82.2 and Django==1.6.1.

hoh avatar Feb 24 '14 15:02 hoh