No Topic option now always appears

This commit is contained in:
CDaut 2022-06-25 19:18:53 +02:00 committed by CDaut
parent c71b06ac9b
commit 39bf44e109

View file

@ -19,7 +19,11 @@
<label> <label>
Tags Tags
<input type="text" id="input_tags" name="tags" <input type="text" id="input_tags" name="tags"
value="{% if post.tags == "Blog.Tag.None" %} {% else %}{{ blog.tags }}{% endif %}"> value="{% if post.tags == "Blog.Tag.None" %} {% else %}
{% for tag in blog.tags %}
{{ tag }}
{% endfor %}
{% endif %}">
</label> </label>
</div> </div>
<div class="input-field col s6"> <div class="input-field col s6">
@ -28,6 +32,7 @@
<option selected>No topic</option> <option selected>No topic</option>
{% else %} {% else %}
<option selected>{{ post.topic.name }}</option> <option selected>{{ post.topic.name }}</option>
<option>No topic</option>
{% endif %} {% endif %}
{% for topic in alltopics %} {% for topic in alltopics %}
<option value="{{ topic.id }}">{{ topic.name }}</option> <option value="{{ topic.id }}">{{ topic.name }}</option>