1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-21 10:51:17 +00:00

Modify recommend message and fix profile cache bug

This commit is contained in:
xiez
2012-08-14 13:27:27 +08:00
parent c42381dc4c
commit 5219347ef8
4 changed files with 8 additions and 2 deletions

View File

@@ -9,6 +9,6 @@ def refresh_cache(user):
Function to be called when change user nickname.
"""
profile = get_first_object_or_none(Profile.objects.filter(user=user))
nickname = profile.nickname if profile else value.split('@')[0]
nickname = profile.nickname if profile else user.split('@')[0]
cache.set(NICKNAME_CACHE_PREFIX+user, nickname, NICKNAME_CACHE_TIMEOUT)