diff options
author | Bnyro <bnyro@tutanota.com> | 2024-11-25 16:57:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 16:57:03 +0100 |
commit | 5bf3fbc93b93cd415e1460877051854c76ae0a28 (patch) | |
tree | dfd98b1de30c481c54ff8e090eed74060fc05e05 /searx/openmetrics.py | |
parent | bad070b4bc2c5afa73edea546c68d3e142a476fc (diff) | |
download | searxng-5bf3fbc93b93cd415e1460877051854c76ae0a28.tar.gz searxng-5bf3fbc93b93cd415e1460877051854c76ae0a28.zip |
[fix] openmetrics: value is None if there's no data
Diffstat (limited to 'searx/openmetrics.py')
-rw-r--r-- | searx/openmetrics.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/openmetrics.py b/searx/openmetrics.py index 5232e05ca..2cc89839b 100644 --- a/searx/openmetrics.py +++ b/searx/openmetrics.py @@ -26,7 +26,7 @@ class OpenMetricsFamily: # pylint: disable=too-few-public-methods """ for i, data_info_dict in enumerate(self.data_info): - if not data_info_dict and data_info_dict != 0: + if not data_info_dict or not self.data[i]: continue info_representation = ','.join([f"{key}=\"{value}\"" for (key, value) in data_info_dict.items()]) |