Fix T49930: bug in texture count

This commit is contained in:
Sybren A. Stüvel 2018-01-25 15:51:15 +01:00
parent dd8d19178b
commit b3a36f2833
2 changed files with 4 additions and 10 deletions

View File

@ -30,7 +30,7 @@ from pillar.web.nodes.custom.storage import StorageNode
from pillar.web.projects.routes import project_update_nodes_list from pillar.web.projects.routes import project_update_nodes_list
from pillar.web.utils import get_file from pillar.web.utils import get_file
from pillar.web.utils import attach_project_pictures from pillar.web.utils import attach_project_pictures
from pillar.web.utils.jstree import jstree_build_children from pillar.web.utils.jstree import jstree_build_children, GROUP_NODES
from pillar.web.utils.jstree import jstree_build_from_node from pillar.web.utils.jstree import jstree_build_from_node
from pillar.web.utils.forms import build_file_select_form from pillar.web.utils.forms import build_file_select_form
from pillar.web import system_util from pillar.web import system_util
@ -159,7 +159,7 @@ def view(node_id, extra_template_args: dict=None):
'user': 1, 'properties.content_type': 1} 'user': 1, 'properties.content_type': 1}
children_where = {'parent': node._id} children_where = {'parent': node._id}
if node_type_name == 'group': if node_type_name in GROUP_NODES:
children_where['properties.status'] = 'published' children_where['properties.status'] = 'published'
children_projection['permissions.world'] = 1 children_projection['permissions.world'] = 1
else: else:

View File

@ -22,10 +22,7 @@
section.node-children.group.texture section.node-children.group.texture
| {% if children %}
| {% for child in children %} | {% for child in children %}
| {% if child.properties.status == 'published' %}
a.list-node-children-container( a.list-node-children-container(
href="#", href="#",
data-node_id="{{ child._id }}", data-node_id="{{ child._id }}",
@ -114,12 +111,10 @@
span {{ child.name }} span {{ child.name }}
| {% endif %} | {% endif %}
| {% endif %}
| {% endfor %}
| {% else %} | {% else %}
.list-node-children-container .list-node-children-container
.list-node-children-empty No textures... yet! .list-node-children-empty No textures... yet!
| {% endif %} | {% endfor %}
script. script.
// Generate GA pageview // Generate GA pageview
@ -193,4 +188,3 @@ script.
include ../_scripts include ../_scripts
| {% endblock %} | {% endblock %}