Fix Elasticsearch retuner

The change db0135e297 did not allow the
returner function to continue when the data key was not present. This
made the Elasticsearch returner inoperable for most cases.

 Conflicts:
	salt/returners/elasticsearch_return.py
This commit is contained in:
Mike Place 2019-02-01 15:56:20 -07:00 committed by Gareth J. Greenaway
parent 1f6da6a2b7
commit 801abf2c57
No known key found for this signature in database
GPG Key ID: 10B62F8A7CAD7A41

View File

@ -225,8 +225,7 @@ def returner(ret):
'functions', job_id, job_fun
)
return
if ret.get('return', None) is None:
if ret.get('data', None) is None and ret.get('return') is None:
log.info(
'Won\'t push new data to Elasticsearch, job with jid=%s was '
'not successful', job_id