Use if-else instead boolean operators
This commit is contained in:
parent
6e73a1bebf
commit
ff287c2e5d
@ -230,8 +230,8 @@ def get_etag(text):
|
|||||||
|
|
||||||
def get_uid(vobject_component):
|
def get_uid(vobject_component):
|
||||||
"""UID value of an item if defined."""
|
"""UID value of an item if defined."""
|
||||||
return ((hasattr(vobject_component, "uid") or None) and
|
return (vobject_component.uid.value
|
||||||
vobject_component.uid.value)
|
if hasattr(vobject_component, "uid") else None)
|
||||||
|
|
||||||
|
|
||||||
def get_uid_from_object(vobject_item):
|
def get_uid_from_object(vobject_item):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user