소스 검색

Don't pass None to vobject.readComponents

If an empty collections is created with PUT, content is None.
Unrud 9 년 전
부모
커밋
28e643dec1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      radicale/__init__.py

+ 1 - 1
radicale/__init__.py

@@ -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