|
@@ -53,7 +53,7 @@ def name_from_path(path):
|
|
|
"""Return Radicale item name from ``path``."""
|
|
"""Return Radicale item name from ``path``."""
|
|
|
log.log(10, "Return Radicale item name from ``path``.")
|
|
log.log(10, "Return Radicale item name from ``path``.")
|
|
|
path_parts = path.strip("/").split("/")
|
|
path_parts = path.strip("/").split("/")
|
|
|
- return path_parts[-1] if len(path_parts) > 2 else None
|
|
|
|
|
|
|
+ return path_parts[-1] if len(path_parts) >= 2 else None
|
|
|
|
|
|
|
|
|
|
|
|
|
def delete(path, calendar):
|
|
def delete(path, calendar):
|
|
@@ -133,7 +133,8 @@ def propfind(path, xml_request, calendar, depth):
|
|
|
tag = ET.Element(_tag("D", "collection"))
|
|
tag = ET.Element(_tag("D", "collection"))
|
|
|
element.append(tag)
|
|
element.append(tag)
|
|
|
elif tag == _tag("D", "owner"):
|
|
elif tag == _tag("D", "owner"):
|
|
|
- element.text = calendar.owner
|
|
|
|
|
|
|
+ if calendar.owner:
|
|
|
|
|
+ element.text = calendar.owner
|
|
|
elif tag == _tag("D", "getcontenttype"):
|
|
elif tag == _tag("D", "getcontenttype"):
|
|
|
element.text = "text/calendar"
|
|
element.text = "text/calendar"
|
|
|
elif tag == _tag("CS", "getctag") and is_calendar:
|
|
elif tag == _tag("CS", "getctag") and is_calendar:
|