Fix fileRules exception without rules
This commit is contained in:
parent
3d7ba7bdf8
commit
d6fdf8af9c
1 changed files with 1 additions and 1 deletions
|
@ -469,7 +469,7 @@ class UiWebsocket(object):
|
|||
|
||||
def actionFileRules(self, to, inner_path):
|
||||
rules = self.site.content_manager.getRules(inner_path)
|
||||
if inner_path.endswith("content.json"):
|
||||
if inner_path.endswith("content.json") and rules:
|
||||
content = self.site.content_manager.contents.get(inner_path)
|
||||
if content:
|
||||
rules["current_size"] = len(json.dumps(content)) + sum([file["size"] for file in content["files"].values()])
|
||||
|
|
Loading…
Reference in a new issue