From 20c9567fa35f114140a831130e937e5dc6bdba54 Mon Sep 17 00:00:00 2001 From: hveficent Date: Fri, 13 Sep 2019 14:28:18 +0200 Subject: [PATCH 1/2] [FIX] bi_sql_editor: Add required attribute name on filters --- bi_sql_editor/models/bi_sql_view_field.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bi_sql_editor/models/bi_sql_view_field.py b/bi_sql_editor/models/bi_sql_view_field.py index 291c1e11..10baf329 100644 --- a/bi_sql_editor/models/bi_sql_view_field.py +++ b/bi_sql_editor/models/bi_sql_view_field.py @@ -227,7 +227,10 @@ class BiSQLViewField(models.Model): self.ensure_one() res = '' if self.field_description and self.is_group_by: - res =\ - """""" % ( - self.field_description, self.name) + res = \ + """""" % ( + self.field_description.lower().replace(' ', '_'), + self.field_description, self.name + ) return res From 608a0b8414969702d70b4dcf0baa66f1b7fb20cf Mon Sep 17 00:00:00 2001 From: hveficent Date: Mon, 23 Sep 2019 16:58:22 +0200 Subject: [PATCH 2/2] change SQL mapping for date --- bi_sql_editor/models/bi_sql_view_field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bi_sql_editor/models/bi_sql_view_field.py b/bi_sql_editor/models/bi_sql_view_field.py index 10baf329..18367842 100644 --- a/bi_sql_editor/models/bi_sql_view_field.py +++ b/bi_sql_editor/models/bi_sql_view_field.py @@ -45,7 +45,7 @@ class BiSQLViewField(models.Model): 'numeric': 'float', 'text': 'char', 'character varying': 'char', - 'date': 'datetime', + 'date': 'date', 'timestamp without time zone': 'datetime', }