Projet

Général

Profil

0007-engine-do-not-hardcode-cube-s-json-field-name-38067.patch

Benjamin Dauvergne, 03 décembre 2019 13:53

Télécharger (995 octets)

Voir les différences:

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(-)
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
-