Check that item is a collection

This commit is contained in:
Unrud 2016-08-13 00:19:14 +02:00 committed by GitHub
parent cf4a6ef749
commit c29fd1ca61

View File

@ -581,7 +581,7 @@ def _propfind_response(path, item, props, user, write=False):
_tag("D", "principal-URL"), _tag("D", "principal-URL"),
_tag("CR", "addressbook-home-set"), _tag("CR", "addressbook-home-set"),
_tag("C", "calendar-home-set")) and _tag("C", "calendar-home-set")) and
collection.is_principal): collection.is_principal and is_collection):
tag = ET.Element(_tag("D", "href")) tag = ET.Element(_tag("D", "href"))
tag.text = _href(collection, path) tag.text = _href(collection, path)
element.append(tag) element.append(tag)