Load content.json content before signing
This commit is contained in:
parent
ec513f0b60
commit
2473a09f7b
1 changed files with 10 additions and 1 deletions
|
@ -503,7 +503,16 @@ class ContentManager(object):
|
|||
content = None
|
||||
if not content: # Content not exist yet, load default one
|
||||
self.log.info("File %s not exist yet, loading default values..." % inner_path)
|
||||
|
||||
if self.site.storage.isFile(inner_path):
|
||||
content = self.site.storage.loadJson(inner_path)
|
||||
if "files" not in content:
|
||||
content["files"] = {}
|
||||
if "signs" not in content:
|
||||
content["signs"] = {}
|
||||
else:
|
||||
content = {"files": {}, "signs": {}} # Default content.json
|
||||
|
||||
if inner_path == "content.json": # It's the root content.json, add some more fields
|
||||
content["title"] = "%s - ZeroNet_" % self.site.address
|
||||
content["description"] = ""
|
||||
|
|
Loading…
Reference in a new issue