Skip to content
Permalink
Browse files

Not changing meta, but all values for keys in meta, which are themsel…

…ves dicts.
  • Loading branch information
felixfontein committed May 23, 2015
1 parent 9a8101d commit ce40295722c2395b04647312c665806831663540
Showing with 5 additions and 2 deletions.
  1. +5 −2 nikola/post.py
@@ -237,8 +237,11 @@ def __repr__(self):
m.update(utils.unicode_str(os.stat(self.source_path).st_mtime).encode('utf-8'))
clean_meta = {}
for k, v in self.meta.items():
if v:
clean_meta[k] = v
sub_meta = {}
clean_meta[k] = sub_meta
for kk, vv in v.items():
if vv:
sub_meta[kk] = vv
m.update(utils.unicode_str(json.dumps(clean_meta, cls=utils.CustomEncoder, sort_keys=True)).encode('utf-8'))
return '<Post: {0} {1}>'.format(self.source_path, m.hexdigest())

0 comments on commit ce40295

Please sign in to comment.
You can’t perform that action at this time.