From 4893f949201a39698ac489e9816692ddec0508ca Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Wed, 25 Jan 2012 20:23:37 +0100 Subject: [PATCH] Clean the calendar-timezone proppatch setter --- radicale/xmlutils.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 536f21cf..eace8dac 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -374,11 +374,9 @@ def proppatch(path, xml_request, collection): with collection.props as collection_props: for short_name, value in props_to_set.items(): - if short_name == 'C:calendar-timezone': - collection.replace('', value) - collection.write() - else: - collection_props[short_name] = value + if short_name.split(":")[-1] == "calendar-timezone": + collection.replace(None, value) + collection_props[short_name] = value _add_propstat_to(response, short_name, 200) for short_name in props_to_remove: try: