diff --git a/blender_cloud/pillar.py b/blender_cloud/pillar.py index 2124d8a..8a49bc7 100644 --- a/blender_cloud/pillar.py +++ b/blender_cloud/pillar.py @@ -236,7 +236,7 @@ async def get_project_uuid(project_url: str) -> str: async def get_nodes(project_uuid: str = None, parent_node_uuid: str = None, - node_type: str = None) -> list: + node_type = None) -> list: """Gets nodes for either a project or given a parent node. @param project_uuid: the UUID of the project, or None if only querying by parent_node_uuid. @@ -261,7 +261,10 @@ async def get_nodes(project_uuid: str = None, parent_node_uuid: str = None, where['project'] = project_uuid if node_type: - where['node_type'] = node_type + if isinstance(node_type, str): + where['node_type'] = node_type + else: + where['node_type'] = {'$in': node_type} children = await pillar_call(pillarsdk.Node.all, { 'projection': {'name': 1, 'parent': 1, 'node_type': 1,