Tags: Update test indexing template for Jinja2

Jinja2 doesn't support the {% empty %} node, instead it uses
the {% else %} node for the same purpose.

Fixed the tag indexing failing test.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-11-27 05:14:58 -04:00
parent cb408c768d
commit 0f5625a356

View File

@@ -8,13 +8,13 @@ TEST_TAG_COLOR_EDITED = '#221100'
TEST_TAG_INDEX_HAS_TAG = 'HAS_TAG'
TEST_TAG_INDEX_NO_TAG = 'NO_TAG'
TEST_TAG_INDEX_NODE_TEMPLATE = '''
{{% for tag in document.tags.all %}}
{{% for tag in document.tags.all() %}}
{{% if tag.label == "{}" %}}
{}
{{% else %}}
NO_TAG
{{% endif %}}
{{% empty %}}
{{% else %}}
NO_TAG
{{% endfor %}}
'''.format(