fix crash if there is no ':' in IDs
This commit is contained in:
parent
5dc11b2197
commit
a055182e5f
1 changed files with 2 additions and 1 deletions
|
|
@ -47,6 +47,7 @@ class TitrePage(LoggedPage, RawPage):
|
||||||
invest = Investment(_id)
|
invest = Investment(_id)
|
||||||
invest.label = unicode(columns[0].split('{')[-1])
|
invest.label = unicode(columns[0].split('{')[-1])
|
||||||
invest.code = NotAvailable
|
invest.code = NotAvailable
|
||||||
|
if ':' in _id:
|
||||||
invest.description = unicode(_id.split(':')[1])
|
invest.description = unicode(_id.split(':')[1])
|
||||||
invest.quantity = Decimal(FrenchTransaction.clean_amount(columns[1]))
|
invest.quantity = Decimal(FrenchTransaction.clean_amount(columns[1]))
|
||||||
invest.unitprice = Decimal(FrenchTransaction.clean_amount(columns[2]))
|
invest.unitprice = Decimal(FrenchTransaction.clean_amount(columns[2]))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue