소스 검색

Clean the calendar-timezone proppatch setter

Guillaume Ayoub 14 년 전
부모
커밋
4893f94920
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      radicale/xmlutils.py

+ 3 - 5
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: