[migration] bug fix in dashboard migration (bebcf3fed1fe_) (#5497)

fix a bug in handle empty rows
This commit is contained in:
Grace Guo 2018-07-26 13:15:09 -07:00 committed by GitHub
parent 3df82d9da6
commit 7ff02c0050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,13 +351,13 @@ def convert(positions, level, parent, root):
# they can be a list of charts, or arranged in columns, or mixed
for layer in layers:
if len(layer) == 0:
return
continue
if len(layer) == 1 and parent['type'] == COLUMN_TYPE:
chart_holder = get_chart_holder(layer[0])
root[chart_holder['id']] = chart_holder
parent['children'].append(chart_holder['id'])
return
continue
# create a new row
row_container = get_row_container()