don't update if count is 0

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-06-12 20:00:36 -04:00
parent 5f7c448c18
commit 9ad8ef644b
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ def main():
if opts.query > 0:
resp = es.search(index=index, body=body)
print_logs(resp['hits']['hits'])
elif opts.update:
elif opts.update and count > 0:
# add the script for extracting peer_id
body['script'] = { 'lang': 'painless', 'inline': PAINLESS_SCRIPT }
try: