diff options
| author | Ravi Prakash Putchala <praks.putchala> | 2015-09-09 13:04:24 +0530 |
|---|---|---|
| committer | Ravi Prakash Putchala <praks.putchala> | 2015-09-09 13:04:24 +0530 |
| commit | 7a0cd16c1a5be16f3df395ee12ed11d0ddde7837 (patch) | |
| tree | 7f22f2850ffc870e381b78d8ad69de7cd7b6a5b0 /requests/models.py | |
| parent | 37037607b5f3da32ff1897caca3c38e210f04c37 (diff) | |
| download | python-requests-7a0cd16c1a5be16f3df395ee12ed11d0ddde7837.tar.gz | |
changed the null check for 'data' parameter to be more explicit.
removed the superfluous encode from the testcase.
Diffstat (limited to 'requests/models.py')
| -rw-r--r-- | requests/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/requests/models.py b/requests/models.py index 9fa367d3..06e84362 100644 --- a/requests/models.py +++ b/requests/models.py @@ -414,7 +414,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): content_type = None length = None - if not data and json is not None: + if data == {} and json is not None: content_type = 'application/json' body = complexjson.dumps(json) |
