Procházet zdrojové kódy

Add simple support for calendar-user-address-set (references #181)

Guillaume Ayoub před 15 roky
rodič
revize
9874129bbb
1 změnil soubory, kde provedl 4 přidání a 5 odebrání
  1. 4 5
      radicale/xmlutils.py

+ 4 - 5
radicale/xmlutils.py

@@ -140,11 +140,10 @@ def propfind(path, xml_request, calendar, depth):
                 tag = ET.Element(_tag("D", "href"))
                 tag.text = path
                 element.append(tag)
-            elif tag == _tag("D", "principal-collection-set"):
-                tag = ET.Element(_tag("D", "href"))
-                tag.text = path
-                element.append(tag)
-            elif tag == _tag("C", "calendar-home-set"):
+            elif tag in (
+                _tag("D", "principal-collection-set"),
+                _tag("C", "calendar-user-address-set"),
+                _tag("C", "calendar-home-set")):
                 tag = ET.Element(_tag("D", "href"))
                 tag.text = path
                 element.append(tag)