diff --git a/O365/connection.py b/O365/connection.py index f27a9efcf5d7..887e67e1c2c2 100644 --- a/O365/connection.py +++ b/O365/connection.py @@ -562,7 +562,7 @@ def _internal_request(self, request_obj, url, method, **kwargs): if kwargs.get('headers') is not None and kwargs['headers'].get( 'Content-type') is None: kwargs['headers']['Content-type'] = 'application/json' - if 'data' in kwargs and kwargs['headers'].get( + if 'data' in kwargs and kwargs['data'] is not None and kwargs['headers'].get( 'Content-type') == 'application/json': kwargs['data'] = json.dumps( kwargs['data']) # auto convert to json