From fc6aa7cc1cb14e234bc3e7061d4b34b31f2df2ce Mon Sep 17 00:00:00 2001 From: caryoscelus Date: Wed, 5 Dec 2018 10:05:43 +0000 Subject: [PATCH] Minor fix in sidebar plugin Under certain conditions content["files"] is present, but is None, which led to exception and thus failure of the whole sidebar. --- plugins/Sidebar/SidebarPlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index 1ae47455..e4e77067 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -196,7 +196,7 @@ class UiWebsocketPlugin(object): contents = site.content_manager.listContents() # Without user files for inner_path in contents: content = site.content_manager.contents[inner_path] - if "files" not in content: + if "files" not in content or content["files"] is None: continue for file_name, file_details in content["files"].items(): size_total += file_details["size"]