From 96bd8bb43f68c7e77148221eea1fc56e1f7d52c7 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 25 Aug 2011 18:12:36 +0200 Subject: [PATCH] cleanup settings --- pandora/user/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora/user/views.py b/pandora/user/views.py index f8fbd29..6767898 100644 --- a/pandora/user/views.py +++ b/pandora/user/views.py @@ -459,7 +459,10 @@ def setUI(request): if key not in p: p[key] = {} p = p[key] - p[keys[0]] = value + if value == None: + del p[keys[0]] + else: + p[keys[0]] = value profile.save() if data.get('item', False):