Skip to content

Commit b061fb9

Browse files
committedMay 24, 2015
Merge pull request #1751 from getnikola/1747
fix #1747
2 parents b4349fd + ce40295 commit b061fb9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎CHANGES.txt

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Features
1414
Bugfixes
1515
--------
1616

17+
* Avoid some rebuild loops (Issue #1747)
1718
* Better error if two posts/pages output conflict (Issue #1749)
1819
* Scanning of posts refactored out of core (Issue #1700)
1920
* github_deploy records lastdeploy timestamp like regular deploy

‎nikola/post.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,14 @@ def __repr__(self):
235235
m = hashlib.md5()
236236
# source_path modification date (to avoid reading it)
237237
m.update(utils.unicode_str(os.stat(self.source_path).st_mtime).encode('utf-8'))
238-
m.update(utils.unicode_str(json.dumps(self.meta, cls=utils.CustomEncoder, sort_keys=True)).encode('utf-8'))
238+
clean_meta = {}
239+
for k, v in self.meta.items():
240+
sub_meta = {}
241+
clean_meta[k] = sub_meta
242+
for kk, vv in v.items():
243+
if vv:
244+
sub_meta[kk] = vv
245+
m.update(utils.unicode_str(json.dumps(clean_meta, cls=utils.CustomEncoder, sort_keys=True)).encode('utf-8'))
239246
return '<Post: {0} {1}>'.format(self.source_path, m.hexdigest())
240247

241248
def _has_pretty_url(self, lang):

0 commit comments

Comments
 (0)
Please sign in to comment.