From 3948a9562db886e7ead6a48dbcbada34fbeb0838 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 8 Oct 2015 14:53:35 +0100 Subject: [PATCH] Use general null check for JSON --- requests/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/models.py b/requests/models.py index 3b8750fc..da6dccdc 100644 --- a/requests/models.py +++ b/requests/models.py @@ -414,7 +414,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): content_type = None length = None - if data == {} and json is not None: + if not data and json is not None: content_type = 'application/json' body = complexjson.dumps(json)