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
|
- addition of optional comment fields on edit
|
||||||
- cache-based lock for writing
|
- cache-based lock for writing
|
||||||
- added MARKUPWIKI_ settings
|
- added MARKUPWIKI_ settings
|
||||||
|
- RSS for articles and wiki as a whole
|
||||||
|
|
||||||
0.1.0
|
0.1.0
|
||||||
=====
|
=====
|
||||||
|
4
TODO
4
TODO
@ -1,8 +1,6 @@
|
|||||||
* revert option
|
* revert option
|
||||||
* wikiword highlighting
|
* wikiword highlighting
|
||||||
* detect broken wiki links
|
* detect broken wiki links
|
||||||
|
* tests
|
||||||
* only store diffs?
|
* only store diffs?
|
||||||
* anonymous edits?
|
* anonymous edits?
|
||||||
|
|
||||||
add options:
|
|
||||||
* MARKUPWIKI_WIKIWORD_RE
|
|
||||||
|
@ -68,7 +68,8 @@ class Article(models.Model):
|
|||||||
cache.delete(cache_key)
|
cache.delete(cache_key)
|
||||||
return lock == user.id
|
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
|
return True
|
||||||
|
|
||||||
class ArticleVersion(models.Model):
|
class ArticleVersion(models.Model):
|
||||||
|
Loading…
Reference in New Issue
Block a user