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:
7
views.py
7
views.py
@@ -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
|
||||
|
Reference in New Issue
Block a user