diff --git a/app/util/globals.py b/app/util/globals.py index 8234d96..ad7c1e8 100644 --- a/app/util/globals.py +++ b/app/util/globals.py @@ -17,10 +17,3 @@ class Error: def __init__(self, title: str, description: str): self.Title = title self.Description = description - - # return dict version of self - def toDict(self) -> dict: - return { - "Title": self.Title, - "Description": self.Description - } diff --git a/main.py b/main.py index ee64eec..19dc6e1 100755 --- a/main.py +++ b/main.py @@ -71,7 +71,7 @@ def start( if err is not None: eel.post_data(f'An error has occured while generating the timetable: {err.Title}') - return err.toDict() + return err.__dict__ eel.post_data('Gathering latest data...')() # Get updated students @@ -84,6 +84,6 @@ def start( # TODO: log master_timetable - return err.toDict() if err is not None else None + return err.__dict__ if err is not None else None eel.start('index.html', size=(800, 1000))