瀏覽代碼

Corrected calendar-timezone code in xmlutils.py

Jasper Bryant-Greene 10 年之前
父節點
當前提交
0670aa9fb4
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      radicale/xmlutils.py

+ 4 - 3
radicale/xmlutils.py

@@ -349,9 +349,10 @@ def _propfind_response(path, item, props, user, write=False):
                 elif tag == _tag("CS", "getctag"):
                     element.text = item.etag
                 elif tag == _tag("C", "calendar-timezone"):
-                    timezones = {}
-                    for event in item.list():
-                        if "vtimezone" in event.content:
+                    timezones = set()
+                    for href, _ in item.list():
+                        event = item.get(href)
+                        if "vtimezone" in event.contents:
                             for timezone in event.vtimezone_list:
                                 timezones.add(timezone)
                     collection = vobject.iCalendar()