mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
Fix 'argument to reversed() must be a sequence' (#4237)
When passing empty/null location data out of certain rows in the spatial control, Superset raises an error when trying to reverse the tuple.
This commit is contained in:
committed by
GitHub
parent
5079b2aa95
commit
36caca3244
@@ -1852,7 +1852,10 @@ class BaseDeckGLViz(BaseViz):
|
||||
elif spatial.get('type') == 'delimited':
|
||||
df[key] = (df[spatial.get('lonlatCol')].str.split(spatial.get('delimiter')))
|
||||
if spatial.get('reverseCheckbox'):
|
||||
df[key] = [list(reversed(item))for item in df[key]]
|
||||
df[key] = [
|
||||
tuple(reversed(o)) if isinstance(o, (list, tuple)) else (0, 0)
|
||||
for o in df[key]
|
||||
]
|
||||
del df[spatial.get('lonlatCol')]
|
||||
elif spatial.get('type') == 'geohash':
|
||||
latlong = df[spatial.get('geohashCol')].map(geohash.decode)
|
||||
|
||||
Reference in New Issue
Block a user