File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ Changelog
99Version compatible with elasticsearch 5.0
1010
1111 * added ``headers `` arg to connections to support custom http headers
12+ * passing in a keyword parameter with ``None `` as value will cause that param
13+ to be ignored
1214
13152.3.0 (2016-02-29)
1416------------------
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def _escape(value):
3333 except UnicodeDecodeError :
3434 # Python 2 and str, no need to re-encode
3535 pass
36-
36+
3737 return str (value )
3838
3939def _make_path (* parts ):
@@ -60,7 +60,9 @@ def _wrapped(*args, **kwargs):
6060 params = kwargs .pop ('params' , {})
6161 for p in es_query_params + GLOBAL_PARAMS :
6262 if p in kwargs :
63- params [p ] = _escape (kwargs .pop (p ))
63+ v = kwargs .pop (p )
64+ if v is not None :
65+ params [p ] = _escape (v )
6466
6567 # don't treat ignore and request_timeout as other params to avoid escaping
6668 for p in ('ignore' , 'request_timeout' ):
You can’t perform that action at this time.
0 commit comments