From 1e8d9eda50e482d84e05bfa19405709735169dc9 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Tue, 24 Dec 2024 12:10:47 +0100 Subject: [PATCH] fix found by mypy --- radicale/app/put.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", "") == "*"