From a055182e5f8364835bb514de7a3bca030200f31f Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 13 Nov 2014 07:57:35 +0100 Subject: [PATCH] fix crash if there is no ':' in IDs --- modules/ing/pages/titre.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ing/pages/titre.py b/modules/ing/pages/titre.py index c725cf2c..a1346f7d 100644 --- a/modules/ing/pages/titre.py +++ b/modules/ing/pages/titre.py @@ -47,7 +47,8 @@ class TitrePage(LoggedPage, RawPage): invest = Investment(_id) invest.label = unicode(columns[0].split('{')[-1]) invest.code = NotAvailable - invest.description = unicode(_id.split(':')[1]) + if ':' in _id: + invest.description = unicode(_id.split(':')[1]) invest.quantity = Decimal(FrenchTransaction.clean_amount(columns[1])) invest.unitprice = Decimal(FrenchTransaction.clean_amount(columns[2])) invest.unitvalue = Decimal(FrenchTransaction.clean_amount(columns[3]))