From d869962334a9f7294552908d81eab22f66bb0691 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Sun, 10 Oct 2010 15:41:02 +0200 Subject: [PATCH] fix setting user textures --- pyweb/mumble/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyweb/mumble/views.py b/pyweb/mumble/views.py index 7721be3..ac1379d 100644 --- a/pyweb/mumble/views.py +++ b/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" )