added a line to fix persistence with deleted revs
kaylea realized that we need to initialize the old_rev_data dictionary or it fails when the first revision to a page is deleted. This patch is from kaylea and modified by mako.
This commit is contained in:
parent
cdfa77d66d
commit
556285b198
2
wikiq
2
wikiq
@ -367,6 +367,8 @@ class WikiqParser():
|
||||
rev_data['collapsed_revs'] = rev.collapsed_revs
|
||||
|
||||
if self.persist != PersistMethod.none:
|
||||
# initialize an empty dictionary before assigning things into it. this catches bugs if the first revision is deleted
|
||||
old_rev_data = {}
|
||||
if rev.deleted.text:
|
||||
for k in ["token_revs", "tokens_added", "tokens_removed", "tokens_window"]:
|
||||
old_rev_data[k] = None
|
||||
|
Loading…
Reference in New Issue
Block a user