Skip to content

Commit 39fafc6

Browse files
committed
Attempts to fix a UnicodeEncodeError when generating tag for non-ascii concept name
1 parent 4025986 commit 39fafc6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

data_manager/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ class Meta:
141141
primary_nature = models.CharField(max_length=ConfigNature.choices_maxlength(), choices=ConfigNature.get_choices())
142142

143143
def __str__(self):
144+
return unicode(self).encode("utf-8")
145+
146+
def __unicode__(self):
144147
return "{}{}".format(self.common_name if self.common_name else self.distinctive_name,
145148
" ({})".format(self.year) if self.year else "")
146149

0 commit comments

Comments
 (0)