diff --git a/bbcli/endpoints.py b/bbcli/endpoints.py index 5c5f32065e41a6e4f0ce3ad65afd2a0373694c93..e4d5bbea218f6d89524579583ce5142c8ee26c22 100644 --- a/bbcli/endpoints.py +++ b/bbcli/endpoints.py @@ -12,6 +12,9 @@ from anytree import Node as Nd, RenderTree from bbcli import check_response from bbcli.entities.Node import Node +from bbcli.utils.URL_builder import URLBuilder + +url_builder = URLBuilder() base_url = 'https://ntnu.blackboard.com/learn/api/public/v1/' @@ -109,8 +112,8 @@ def get_children(session, worklist, url, acc, count: int = 0): children = response.json()['results'] for i in range(len(children)): # TODO: Add list of children instead of bool - # if key in children[i] and children[i][key] == True: - if children[i]['contentHandler'] == content_types['folder']: + if key in children[i] and children[i][key] == True: + # if children[i]['contentHandler'] == content_types['folder']: child = Node(children[i], True, node) worklist.append(child) acc.append(child)