accidentally cached too well, fixed.
authorBryan <btbonval@gmail.com>
Thu, 12 Mar 2015 06:39:42 +0000 (02:39 -0400)
committerBryan <btbonval@gmail.com>
Thu, 12 Mar 2015 06:39:42 +0000 (02:39 -0400)
karmaworld/apps/notes/models.py

index fe91c3b186c6368bdfefe5535ec99b4176f87ff9..0a612217e24afb3f445b43e73b27e5e8083946ce 100644 (file)
@@ -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