python3: make sure regex substitution is done on strings

This commit is contained in:
Frédéric Péters 2018-07-27 09:05:46 +02:00
parent e091734e1e
commit 46847b2198
1 changed files with 1 additions and 1 deletions

View File

@ -505,7 +505,7 @@ class CellBase(six.with_metaclass(CellMeta, models.Model)):
label = self.get_verbose_name()
additional_label = self.get_additional_label()
if label and additional_label:
return '%s (%s)' % (label, re.sub(r'\r?\n', ' ', force_text(additional_label)))
return u'%s (%s)' % (label, re.sub(r'\r?\n', u' ', force_text(additional_label)))
else:
return force_text(label)