visualization: use formatting instead of unicode() (#38908)
This commit is contained in:
parent
7e858006b6
commit
d5aa874116
|
@ -248,7 +248,7 @@ class Visualization(object):
|
|||
table[-1].append(_('Total'))
|
||||
for y in y_axis:
|
||||
table.append([y.label])
|
||||
table[-1].extend(unicode(grid[(x.id, y.id)]) for x in x_axis)
|
||||
table[-1].extend('%s' % (grid[(x.id, y.id)],) for x in x_axis)
|
||||
# line sums
|
||||
if compute_lines_sums:
|
||||
table[-1].append(sums_lines[y.id])
|
||||
|
@ -263,17 +263,17 @@ class Visualization(object):
|
|||
table.append([self.measure.label])
|
||||
for x in x_axis:
|
||||
table[0].append(x.label)
|
||||
table[1].append(unicode(grid[x.id])),
|
||||
table[1].append('%s' % (grid[x.id],)),
|
||||
elif self.drilldown_y:
|
||||
y_axis, grid = self.table_1d()
|
||||
table.append([self.drilldown_y.label, self.measure.label])
|
||||
for y in y_axis:
|
||||
table.append([
|
||||
y.label,
|
||||
unicode(grid[y.id]),
|
||||
'%s' % (grid[y.id],),
|
||||
])
|
||||
else:
|
||||
table.append([self.measure.label, unicode(self.data()[0].measures[0])])
|
||||
table.append([self.measure.label, '%s' % (self.data()[0].measures[0],)])
|
||||
|
||||
for row in table:
|
||||
for cell in row:
|
||||
|
|
Loading…
Reference in New Issue