fix lock grab on releasing a non-existent lock

This commit is contained in:
James Turk 2010-04-07 12:20:05 -04:00
parent 7f14aa327a
commit 2fa60828fa
3 changed files with 4 additions and 4 deletions

View File

@ -4,6 +4,7 @@
- addition of optional comment fields on edit
- cache-based lock for writing
- added MARKUPWIKI_ settings
- RSS for articles and wiki as a whole
0.1.0
=====

4
TODO
View File

@ -1,8 +1,6 @@
* revert option
* wikiword highlighting
* detect broken wiki links
* tests
* only store diffs?
* anonymous edits?
add options:
* MARKUPWIKI_WIKIWORD_RE

View File

@ -68,7 +68,8 @@ class Article(models.Model):
cache.delete(cache_key)
return lock == user.id
cache.set(cache_key, user.id, WRITE_LOCK_SECONDS)
if not release:
cache.set(cache_key, user.id, WRITE_LOCK_SECONDS)
return True
class ArticleVersion(models.Model):