engine: do not hardcode cube's json field name (#38067)
This commit is contained in:
parent
a868f11d42
commit
3f7bedf0d3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue