projects
/
oweals
/
karmaworld.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ae1ea3
)
accidentally cached too well, fixed.
author
Bryan
<btbonval@gmail.com>
Thu, 12 Mar 2015 06:39:42 +0000
(
02:39
-0400)
committer
Bryan
<btbonval@gmail.com>
Thu, 12 Mar 2015 06:39:42 +0000
(
02:39
-0400)
karmaworld/apps/notes/models.py
patch
|
blob
|
history
diff --git
a/karmaworld/apps/notes/models.py
b/karmaworld/apps/notes/models.py
index fe91c3b186c6368bdfefe5535ec99b4176f87ff9..0a612217e24afb3f445b43e73b27e5e8083946ce 100644
(file)
--- a/
karmaworld/apps/notes/models.py
+++ b/
karmaworld/apps/notes/models.py
@@
-398,7
+398,9
@@
class Note(Document):
if cache.has_key('staff') and cache['staff']:
return True
# Users must have 20 points to edit tags.
- if cache.has_key('profile') and not cache.has_key('points'):
+ if cache.has_key('profile'):
+ # make sure to update points, caching is really just for passing
+ # back in the call stack, not caching for long periods.
cache['points'] = cache['profile'].get_points()
return cache.has_key('points') and cache['points'] >= 20