From 611e7cddee42a62bb1ec0dced6060b6305ff4a95 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Sun, 28 Jul 2013 09:00:55 +0000 Subject: Make sure we are at the tip before saving --- diff --git a/hatta/storage.py b/hatta/storage.py index ae70a39..3f77a58 100644 --- a/hatta/storage.py +++ b/hatta/storage.py @@ -196,6 +196,7 @@ class WikiStorage(object): def save_data(self, title, data, author=None, comment=None, parent_rev=None): """Save a new revision of the page. If the data is None, deletes it.""" + self.reopen() # Make sure we are at the tip. _ = self._ user = (author or _(u'anon')).encode('utf-8') text = (comment or _(u'comment')).encode('utf-8') -- cgit v0.9.1