Browse Source

fix setting user textures

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
d869962334
  1. 6
      pyweb/mumble/views.py

6
pyweb/mumble/views.py

@ -402,10 +402,10 @@ def update_avatar( request, userid ):
textureform = MumbleTextureForm( request.POST, request.FILES )
if textureform.is_valid():
if 'usegravatar' in textureform.cleaned_data and user.gravatar:
if textureform.cleaned_data['usegravatar'] and user.gravatar:
user.setTextureFromUrl( user.gravatar )
elif 'texturefile' in request.FILES:
user.setTexture( Image.open( request.FILES['texturefile'] ) )
else:
user.setTexture( Image.open( textureform.cleaned_data['texturefile'] ) )
return HttpResponse( "true", mimetype="text/html" )
return HttpResponse( "false", mimetype="text/html" )

Loading…
Cancel
Save