Procházet zdrojové kódy

return None instead of False if UID field is missing

Unrud před 8 roky
rodič
revize
e47747d4d4
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      radicale/storage.py

+ 1 - 1
radicale/storage.py

@@ -148,7 +148,7 @@ def get_etag(text):
 
 def get_uid(item):
     """UID value of an item if defined."""
-    return hasattr(item, "uid") and item.uid.value
+    return (hasattr(item, "uid") or None) and item.uid.value
 
 
 def sanitize_path(path):