None for parameter value should cause that param to be ignored
Fixes #375
This commit is contained in:
@@ -9,6 +9,8 @@ Changelog
|
|||||||
Version compatible with elasticsearch 5.0
|
Version compatible with elasticsearch 5.0
|
||||||
|
|
||||||
* added ``headers`` arg to connections to support custom http headers
|
* added ``headers`` arg to connections to support custom http headers
|
||||||
|
* passing in a keyword parameter with ``None`` as value will cause that param
|
||||||
|
to be ignored
|
||||||
|
|
||||||
2.3.0 (2016-02-29)
|
2.3.0 (2016-02-29)
|
||||||
------------------
|
------------------
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ def query_params(*es_query_params):
|
|||||||
params = kwargs.pop('params', {})
|
params = kwargs.pop('params', {})
|
||||||
for p in es_query_params + GLOBAL_PARAMS:
|
for p in es_query_params + GLOBAL_PARAMS:
|
||||||
if p in kwargs:
|
if p in kwargs:
|
||||||
params[p] = _escape(kwargs.pop(p))
|
v = kwargs.pop(p)
|
||||||
|
if v is not None:
|
||||||
|
params[p] = _escape(v)
|
||||||
|
|
||||||
# don't treat ignore and request_timeout as other params to avoid escaping
|
# don't treat ignore and request_timeout as other params to avoid escaping
|
||||||
for p in ('ignore', 'request_timeout'):
|
for p in ('ignore', 'request_timeout'):
|
||||||
|
|||||||
Reference in New Issue
Block a user