fixed cname caching bug

This commit is contained in:
Christopher Slowe
2008-08-26 10:17:00 -07:00
parent 32a2677ebb
commit 442c9714f3
2 changed files with 5 additions and 1 deletions

View File

@@ -908,10 +908,13 @@ class ApiController(RedditController):
if not res.error:
#assume sr existed, or was just built
clear_memo('subreddit._by_domain', Subreddit, _force_unicode(sr.domain))
clear_memo('subreddit._by_domain',
Subreddit, _force_unicode(sr.domain))
for k, v in kw.iteritems():
setattr(sr, k, v)
sr._commit()
clear_memo('subreddit._by_domain',
Subreddit, _force_unicode(sr.domain))
# flag search indexer that something has changed
tc.changed(sr)

View File

@@ -347,6 +347,7 @@ class SimpleGetMenu(NavMenu):
def __init__(self, **kw):
kw['default'] = kw.get('default', self.default)
kw['base_path'] = kw.get('base_path') or request.path
buttons = [NavButton(self.make_title(n), n, opt = self.get_param)
for n in self.options]
NavMenu.__init__(self, buttons, type = self.type, **kw)