mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-22 03:16:34 +00:00
fix merge bug in set_profile
This commit is contained in:
@@ -37,10 +37,11 @@ def logout_relay(request):
|
|||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def edit_profile(request):
|
def edit_profile(request):
|
||||||
|
modified = False
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
modified = True
|
|
||||||
form = ProfileForm(request.POST)
|
form = ProfileForm(request.POST)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
|
modified = True
|
||||||
nickname = form.cleaned_data['nickname']
|
nickname = form.cleaned_data['nickname']
|
||||||
intro = form.cleaned_data['intro']
|
intro = form.cleaned_data['intro']
|
||||||
try:
|
try:
|
||||||
@@ -53,7 +54,6 @@ def edit_profile(request):
|
|||||||
profile.intro = intro
|
profile.intro = intro
|
||||||
profile.save()
|
profile.save()
|
||||||
else:
|
else:
|
||||||
modified = False
|
|
||||||
try:
|
try:
|
||||||
profile = Profile.objects.get(user=request.user.username)
|
profile = Profile.objects.get(user=request.user.username)
|
||||||
form = ProfileForm({
|
form = ProfileForm({
|
||||||
|
Reference in New Issue
Block a user