Преглед изворни кода

return None instead of False if UID field is missing

Unrud пре 8 година
родитељ
комит
e47747d4d4
1 измењених фајлова са 1 додато и 1 уклоњено
  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):