From 15d10acf9e72123eaeaa97774416403b90afc96b Mon Sep 17 00:00:00 2001 From: Bryan Date: Thu, 12 Mar 2015 02:39:42 -0400 Subject: [PATCH] accidentally cached too well, fixed. --- karmaworld/apps/notes/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.25.1