From ce5b14315701d01ffbbd9b08a4830f9023797adc Mon Sep 17 00:00:00 2001 From: Maik H Date: Thu, 3 Nov 2022 21:18:24 +0100 Subject: [PATCH] Bugfix variable_to_jsonpath: Param is a string, not an object --- mqtt2influxdb/expr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mqtt2influxdb/expr.py b/mqtt2influxdb/expr.py index 76b97fc..f1ad1e0 100644 --- a/mqtt2influxdb/expr.py +++ b/mqtt2influxdb/expr.py @@ -11,7 +11,7 @@ def jsonpath_to_variable(p): def variable_to_jsonpath(p): """Converts a expression variable into a valid JSON path starting with $.""" # replace JSON_ with $ and _ with . - return p.var.replace('JSON_', '$').replace('_', '.') + return p.replace('JSON_', '$').replace('_', '.') def parse_expression(txt):