Skip to content

Commit 0546c9d

Browse files
author
Alejandro Casanovas
committed
Fix googleapis#302 again. Missed the initial check
1 parent b8b8e62 commit 0546c9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

O365/mailbox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def get_message(self, object_id=None, query=None, *, download_attachments=False)
142142
:return: one Message
143143
:rtype: Message or None
144144
"""
145-
if object_id is not None and query is not None:
146-
raise ValueError('Must provide object id or query but not both.')
145+
if object_id is None and query is None:
146+
raise ValueError('Must provide object id or query.')
147147

148148
if object_id is not None:
149149
url = self.build_url(self._endpoints.get('message').format(id=object_id))

0 commit comments

Comments
 (0)