mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-07 18:30:54 +00:00
Use if-else instead boolean operators
This commit is contained in:
parent
6e73a1bebf
commit
ff287c2e5d
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue