You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by aa...@apache.org on 2022/08/18 20:35:46 UTC
[superset] 01/01: timestamp bug
This is an automated email from the ASF dual-hosted git repository.
aafghahi pushed a commit to branch arash.afghahi/sc-55474/chart-power-query-generic-axes-exploring
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 84df3f3f53be2ced32dc93302914a48ca2083e44
Author: AAfghahi <ar...@gmail.com>
AuthorDate: Thu Aug 18 16:35:17 2022 -0400
timestamp bug
---
superset/models/helpers.py | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/superset/models/helpers.py b/superset/models/helpers.py
index e3111166ae..1ce534b593 100644
--- a/superset/models/helpers.py
+++ b/superset/models/helpers.py
@@ -1485,11 +1485,16 @@ class ExploreMixin: # pylint: disable=too-many-public-methods
# if groupby field/expr equals granularity field/expr
if selected == granularity:
table_col = columns_by_name[selected]
- outer = table_col.get_timestamp_expression(
- time_grain=time_grain,
- label=selected,
- template_processor=template_processor,
- )
+ if isinstance(table_col, dict):
+ outer = self.get_timestamp_expression(
+ table_col, time_grain, selected, template_processor
+ )
+ else:
+ outer = table_col.get_timestamp_expression(
+ time_grain=time_grain,
+ label=selected,
+ template_processor=template_processor,
+ )
# if groupby field equals a selected column
elif selected in columns_by_name:
if isinstance(columns_by_name[selected], dict):