Skip to content

Commit 5f33ce2

Browse files
authored
修复dashboard页面Server Error (500) (#2954)
1 parent f8c7ad6 commit 5f33ce2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def create_bar_chart(attr, value, width="600", height="380px"):
213213
else:
214214
bar.add_yaxis("", value, label_opts=opts.LabelOpts())
215215

216-
if len(attr) > 0 and len(attr[0]) > 20:
216+
if len(attr) > 0 and attr[0] and len(attr[0]) > 20:
217217
bar.set_global_opts(
218218
xaxis_opts=opts.AxisOpts(axislabel_opts=opts.LabelOpts(rotate=-10)),
219219
legend_opts=opts.LegendOpts(pos_left="right"),

0 commit comments

Comments
 (0)