summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/postgres
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/python.d.plugin/postgres')
-rw-r--r--collectors/python.d.plugin/postgres/postgres.chart.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/postgres/postgres.chart.py b/collectors/python.d.plugin/postgres/postgres.chart.py
index 7f43877c36..8466a73f7d 100644
--- a/collectors/python.d.plugin/postgres/postgres.chart.py
+++ b/collectors/python.d.plugin/postgres/postgres.chart.py
@@ -703,7 +703,8 @@ class Service(SimpleService):
if row[metric] is not None:
self.data[dimension_id] = int(row[metric])
elif 'locks_count' in row:
- self.data[dimension_id] = row['locks_count'] if metric == row['mode'] else 0
+ if metric == row['mode']:
+ self.data[dimension_id] = row['locks_count']
def discover_databases_(cursor, query):