From 27fd4ba2f5465e4075b6a971af4d1a445dedd1d6 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sun, 18 Oct 2020 11:20:23 +0200 Subject: Fix API call --- gui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui.py b/gui.py index bdb3868..c15c61b 100644 --- a/gui.py +++ b/gui.py @@ -110,7 +110,7 @@ class MoodleFetcher(QThread): log.debug(course) return [] else: - sections = self.api.core_get_contents(courseid = str(course["id"])).json() + sections = self.api.core_course_get_contents(courseid = str(course["id"])).json() if "exception" in sections: log.error(f"failed to load sections from course with id {course['id']} ({course['shortname']})") log.debug(sections) @@ -159,8 +159,10 @@ class MoodleTreeView(QTreeWidget): @pyqtSlot() def onWorkerDone(self): + log.debug("worker done") self.setSortingEnabled(True) +# FIXME: I bet this logger is in another thread and f*cks up class QPlainTextEditLogger(logging.Handler): def __init__(self, parent): super().__init__() -- cgit v1.2.1