From fa01c186501d53c6b8082d45ce0f96094d2dcd43 Mon Sep 17 00:00:00 2001 From: David Glez Date: Thu, 10 Apr 2014 11:12:45 +0200 Subject: [PATCH] BUG #44: establecido el valor por defecto de los gustos a 0 (no a None) --- webapp/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/views.py b/webapp/views.py index 46fea75..0e00b61 100644 --- a/webapp/views.py +++ b/webapp/views.py @@ -153,11 +153,11 @@ def modification_account(request, username): u = request.user p = u.profile.get() - t = Tastes(salty=data['salty'], - sour=data['sour'], - bitter=data['bitter'], - sweet=data['sweet'], - spicy=data['spicy']) + t = Tastes(salty = data['salty'] if data['salty'] != None else 0, + sour = data['sour'] if data['sour'] != None else 0, + bitter = data['bitter'] if data['bitter'] != None else 0, + sweet = data['sweet'] if data['sweet'] != None else 0, + spicy = data['spicy'] if data['spicy'] != None else 0) p.display_name = display_name p.main_language = main_language