hughhhh commented on code in PR #23731:
URL: https://github.com/apache/superset/pull/23731#discussion_r1171575453
##########
superset-frontend/packages/superset-ui-core/src/query/buildQueryContext.ts:
##########
@@ -59,6 +60,38 @@ export default function buildQueryContext(
if (isXAxisSet(formData)) {
queries = queries.map(query => normalizeTimeColumn(formData, query));
}
+
+ /* Some charts saved before GENERIC_CHART_AXES is enabled will have the wrong
+ * time granularity set. This fixes the generated payload to conform with
the new
+ * schema used when GENERIC_CHART_AXES is enabled.
+ */
+ if (hasGenericChartAxes && formData.granularity_sqla) {
+ const filterSubject = formData.granularity_sqla;
Review Comment:
```suggestion
const { granularity_sqla: filterSubject, time_range: timeRange } = formData;
const filterComparator = timeRange || 'No Filter';
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]