fix lock grab on releasing a non-existent lock
This commit is contained in:
		
							parent
							
								
									7f14aa327a
								
							
						
					
					
						commit
						2fa60828fa
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		|  | @ -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,6 +68,7 @@ class Article(models.Model): | ||||||
|                 cache.delete(cache_key) |                 cache.delete(cache_key) | ||||||
|             return lock == user.id |             return lock == user.id | ||||||
| 
 | 
 | ||||||
|  |         if not release: | ||||||
|             cache.set(cache_key, user.id, WRITE_LOCK_SECONDS) |             cache.set(cache_key, user.id, WRITE_LOCK_SECONDS) | ||||||
|         return True |         return True | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 James Turk
						James Turk