From 1fe1e53749a746c4c50f8b7ee79d8034d01891e5 Mon Sep 17 00:00:00 2001 From: nikodemas <47255905+nikodemas@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:07:16 +0100 Subject: [PATCH] Update wma_agent_count_to_opensearch.py --- src/python/CMSSpark/wma_agent_count_to_opensearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/CMSSpark/wma_agent_count_to_opensearch.py b/src/python/CMSSpark/wma_agent_count_to_opensearch.py index 413ca3e..03dc252 100644 --- a/src/python/CMSSpark/wma_agent_count_to_opensearch.py +++ b/src/python/CMSSpark/wma_agent_count_to_opensearch.py @@ -61,7 +61,7 @@ def udf_step_extract(row): site_name, count = "UNKNOWN", 0 result = {'host': host, 'ts': ts, 'wmaid': wmaid, 'wmats': wmats} - if 'steps' in row: + if 'steps' in row and row['steps']: for step in row['steps']: count += 1 if step['site'] is not None: