Fix file rendering if content.json download failed
This commit is contained in:
parent
e8b0a3d1c4
commit
ac69007292
1 changed files with 3 additions and 1 deletions
|
@ -44,7 +44,9 @@ class UiRequestPlugin(object):
|
||||||
return file_generator
|
return file_generator
|
||||||
|
|
||||||
def actionPatchFile(self, site, inner_path, file_generator):
|
def actionPatchFile(self, site, inner_path, file_generator):
|
||||||
content_json = site.content_manager.contents["content.json"]
|
content_json = site.content_manager.contents.get("content.json")
|
||||||
|
if not content_json:
|
||||||
|
return file_generator
|
||||||
lang_file = "languages/%s.json" % translate.lang
|
lang_file = "languages/%s.json" % translate.lang
|
||||||
lang_file_exist = False
|
lang_file_exist = False
|
||||||
if site.settings.get("own"): # My site, check if the file is exist (allow to add new lang without signing)
|
if site.settings.get("own"): # My site, check if the file is exist (allow to add new lang without signing)
|
||||||
|
|
Loading…
Reference in a new issue