1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

Improved nickname fetching in myhome

This commit is contained in:
zhengxie
2012-11-21 21:17:01 +08:00
parent 8913e39904
commit d4ea157f9d

View File

@@ -870,11 +870,8 @@ def myhome(request):
joined_groups = get_personal_groups_by_user(request.user.username)
# get nickname
if not Profile.objects.filter(user=request.user.username):
nickname = ''
else:
profile = Profile.objects.filter(user=request.user.username)[0]
nickname = profile.nickname
profiles = Profile.objects.filter(user=request.user.username)
nickname = profiles[0].nickname if profiles else ''
if request.cloud_mode:
allow_public_share = False