Rev4086, Fix verify content.json files without files_optional

This commit is contained in:
shortcutme 2019-04-29 16:54:07 +02:00
parent 327f580218
commit fd085d2d37
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.7.0"
self.rev = 4085
self.rev = 4086
self.argv = argv
self.action = None
self.pending_changes = {}

View File

@ -151,7 +151,7 @@ class ContentManager(object):
deleted, renamed = self.getFileChanges(old_files, new_files)
for relative_path_old, relative_path_new in renamed.items():
if relative_path_new in new_content.get("files_optional"):
if relative_path_new in new_content.get("files_optional", {}):
self.optionalRenamed(content_inner_dir + relative_path_old, content_inner_dir + relative_path_new)
if self.site.storage.isFile(relative_path_old):
try:
@ -1032,4 +1032,4 @@ class ContentManager(object):
return done
def optionalRenamed(self, inner_path_old, inner_path_new):
return True
return True