Fix repr() on transactions with unicode labels
repr only wants str.
This commit is contained in:
parent
91f59a9cef
commit
d1fcd6c153
1 changed files with 2 additions and 1 deletions
|
|
@ -140,8 +140,9 @@ class Transaction(CapBaseObject):
|
||||||
amount = DecimalField('Amount of transaction')
|
amount = DecimalField('Amount of transaction')
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
label = self.label.encode('utf-8') if self.label else self.label
|
||||||
return "<Transaction date='%s' label='%s' amount=%s>" % (self.date,
|
return "<Transaction date='%s' label='%s' amount=%s>" % (self.date,
|
||||||
self.label, self.amount)
|
label, self.amount)
|
||||||
|
|
||||||
class Transfer(CapBaseObject):
|
class Transfer(CapBaseObject):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue