return no JSONDimension if json_field is not defined

This commit is contained in:
Benjamin Dauvergne 2017-02-28 14:07:22 +01:00
parent 81c37023cc
commit c1e52f05e1
1 changed files with 2 additions and 0 deletions

View File

@ -153,6 +153,8 @@ class JSONDimensions(object):
@property
def cache(self):
if not self.engine_cube.json_field:
return []
if not self.__cache:
cursor = self.engine.get_cursor()
sql = 'select distinct jsonb_object_keys(json_data) as a from formdata order by a'