diff -r 2a8a190f8aee -r 67a30d680f60 handlers.py --- a/handlers.py Sat Feb 14 20:13:26 2009 +0200 +++ b/handlers.py Sun Feb 15 23:50:24 2009 +0200 @@ -115,11 +115,18 @@ if request.is_post() : # update any modified preferences for pref in preferences.pref_list : - # get+parse new POST'd value - # XXX: this doesn't postprocess - new_value = pref.parse(request.get_post(pref.name)) + # get the POST'd value, default = None + post_value = request.get_post(pref.name, None) - # update if changed + # skip non-specified values + # XXX: this is to not clobber timezone_offset to None + if post_value is None : + continue + + # parse the POST'd value, None -> default + new_value = request.prefs.parse(pref, post_value) + + # update if given and changed if new_value != request.prefs[pref] : request.prefs.set(pref.name, new_value) @@ -128,7 +135,6 @@ req = request, prefs = request.prefs, preferences = prefs, - timezones = pytz.common_timezones, ) def channel_select (request, channel) :