From: Bryan Date: Thu, 12 Mar 2015 06:39:42 +0000 (-0400) Subject: accidentally cached too well, fixed. X-Git-Tag: release-20150325~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=15d10acf9e72123eaeaa97774416403b90afc96b;p=oweals%2Fkarmaworld.git accidentally cached too well, fixed. --- diff --git a/karmaworld/apps/notes/models.py b/karmaworld/apps/notes/models.py index fe91c3b..0a61221 100644 --- 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