mirror of
https://github.com/apache/superset.git
synced 2026-05-13 03:45:12 +00:00
fix: Makes time compare migration more resilient (#33592)
(cherry picked from commit b7ba50033a)
This commit is contained in:
committed by
Michael Molina
parent
00cd069af2
commit
f9ff3259b3
@@ -294,9 +294,11 @@ class TimeseriesChart(MigrateViz):
|
||||
if (rolling_type := self.data.get("rolling_type")) and rolling_type != "None":
|
||||
self.data["rolling_type"] = rolling_type
|
||||
|
||||
if time_compare := self.data.get("time_compare"):
|
||||
if (time_compare := self.data.get("time_compare")) is not None:
|
||||
self.data["time_compare"] = [
|
||||
value + " ago" for value in as_list(time_compare) if value
|
||||
v if v.endswith(" ago") else v + " ago"
|
||||
for value in as_list(time_compare)
|
||||
if (v := value.strip())
|
||||
]
|
||||
|
||||
comparison_type = self.data.get("comparison_type") or "values"
|
||||
|
||||
Reference in New Issue
Block a user