diff --git a/exchangelib/properties.py b/exchangelib/properties.py index 69a55f7..a4abffc 100644 --- a/exchangelib/properties.py +++ b/exchangelib/properties.py @@ -647,15 +647,17 @@ class FreeBusyView(EWSElement): @classmethod def from_xml(cls, elem, account): kwargs = {} + working_hours_elem = elem.find('{%s}WorkingHours' % TNS) for f in cls.FIELDS: if f.name == 'working_hours': - kwargs[f.name] = f.from_xml(elem=elem.find('{%s}WorkingHours' % TNS), account=account) + if working_hours_elem is None: + continue + kwargs[f.name] = f.from_xml(elem=working_hours_elem, account=account) continue kwargs[f.name] = f.from_xml(elem=elem, account=account) elem.clear() return cls(**kwargs) - class RoomList(Mailbox): # MSDN: https://msdn.microsoft.com/en-us/library/office/dd899514(v=exchg.150).aspx ELEMENT_NAME = 'RoomList'