Don't pass None to vobject.readComponents

If an empty collections is created with PUT, content is None.
This commit is contained in:
Unrud 2016-05-28 22:46:20 +02:00
parent 656680d998
commit 28e643dec1

View File

@ -546,7 +546,7 @@ class Application:
# Case 1: No item and no ETag precondition: Add new item
# Case 2: Item and ETag precondition verified: Modify item
# Case 3: Item and no Etag precondition: Force modifying item
items = list(vobject.readComponents(content))
items = list(vobject.readComponents(content or ""))
if items:
if item:
# PUT is modifying an existing item