Skip to content

Commit

Permalink
Fix owner property
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed Aug 4, 2017
1 parent c6ca643 commit 8e88a47
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions radicale/xmlutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,11 @@ def _propfind_response(base_prefix, path, item, props, user, write=False,
tag = ET.Element(_tag("D", "collection"))
element.append(tag)
elif tag == _tag("D", "owner"):
if is_leaf and item.owner:
element.text = "/%s/" % item.owner
else:
is404 = True
# return empty elment, if no owner available (rfc3744-5.1)
if collection.owner:
tag = ET.Element(_tag("D", "href"))
tag.text = _href(base_prefix, "/%s/" % collection.owner)
element.append(tag)
elif tag == _tag("D", "displayname"):
if is_leaf:
element.text = item.get_meta("D:displayname") or item.path
Expand Down

0 comments on commit 8e88a47

Please sign in to comment.