Skip to content

Commit

Permalink
Not changing meta, but all values for keys in meta, which are themsel…
Browse files Browse the repository at this point in the history
…ves dicts.
  • Loading branch information
felixfontein committed May 23, 2015
1 parent 9a8101d commit ce40295
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nikola/post.py
Expand Up @@ -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())

Expand Down

0 comments on commit ce40295

Please sign in to comment.