Merge branch 'dev' of github.com:hmarr/mongoengine into dev
This commit is contained in:
commit
bfdaae944d
1 changed files with 2 additions and 2 deletions
|
|
@ -1088,10 +1088,10 @@ class BaseDocument(object):
|
|||
|
||||
def __repr__(self):
|
||||
try:
|
||||
u = unicode(self)
|
||||
u = unicode(self).encode('utf-8')
|
||||
except (UnicodeEncodeError, UnicodeDecodeError):
|
||||
u = '[Bad Unicode data]'
|
||||
return u'<%s: %s>' % (self.__class__.__name__, u)
|
||||
return '<%s: %s>' % (self.__class__.__name__, u)
|
||||
|
||||
def __str__(self):
|
||||
if hasattr(self, '__unicode__'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue