0007-engine-do-not-hardcode-cube-s-json-field-name-38067.patch
bijoe/engine.py | ||
---|---|---|
209 | 209 |
return [] |
210 | 210 |
if not self.__cache: |
211 | 211 |
with self.engine.get_cursor() as cursor: |
212 |
sql = 'select distinct jsonb_object_keys(json_data) as a from formdata order by a' |
|
212 |
sql = ('select distinct jsonb_object_keys(%s) as a from formdata order by a' |
|
213 |
% self.engine_cube.json_field) |
|
213 | 214 |
cursor.execute(sql) |
214 | 215 |
self.__cache = [row[0] for row in cursor.fetchall()] |
215 | 216 |
return self.__cache |
216 |
- |