From 98bf23a958567de87d0b0facdeb6d4673c272442 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 29 Nov 2019 15:29:04 +0100 Subject: [PATCH 07/13] engine: do not hardcode cube's json field name (#38067) --- bijoe/engine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bijoe/engine.py b/bijoe/engine.py index a8a7b89..8838f59 100644 --- a/bijoe/engine.py +++ b/bijoe/engine.py @@ -209,7 +209,8 @@ class JSONDimensions(object): return [] if not self.__cache: with self.engine.get_cursor() as cursor: - sql = 'select distinct jsonb_object_keys(json_data) as a from formdata order by a' + sql = ('select distinct jsonb_object_keys(%s) as a from formdata order by a' + % self.engine_cube.json_field) cursor.execute(sql) self.__cache = [row[0] for row in cursor.fetchall()] return self.__cache -- 2.23.0