diff --git a/radicale/app/put.py b/radicale/app/put.py index a3961269..6e1ba215 100644 --- a/radicale/app/put.py +++ b/radicale/app/put.py @@ -204,7 +204,7 @@ class ApplicationPartPut(ApplicationBase): # Etag asked but item not matching: item has changed logger.warning("Precondition failed on PUT request for %r (HTTP_IF_MATCH: %s, item has different etag: %s)", path, etag, item.etag) return httputils.PRECONDITION_FAILED - if etag: + if item and etag: logger.debug("Precondition passed on PUT request for %r (HTTP_IF_MATCH: %s, item has etag: %s)", path, etag, item.etag) match = environ.get("HTTP_IF_NONE_MATCH", "") == "*"