fix lock grab on releasing a non-existent lock
This commit is contained in:
parent
7f14aa327a
commit
2fa60828fa
@ -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
4
TODO
@ -1,8 +1,6 @@
|
||||
* revert option
|
||||
* wikiword highlighting
|
||||
* detect broken wiki links
|
||||
* tests
|
||||
* only store diffs?
|
||||
* anonymous edits?
|
||||
|
||||
add options:
|
||||
* MARKUPWIKI_WIKIWORD_RE
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user