return None instead of False if UID field is missing
This commit is contained in:
parent
bea855cb80
commit
e47747d4d4
@ -148,7 +148,7 @@ def get_etag(text):
|
|||||||
|
|
||||||
def get_uid(item):
|
def get_uid(item):
|
||||||
"""UID value of an item if defined."""
|
"""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):
|
def sanitize_path(path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user