From 00c784e3314d68121cc2be46bfa1030b204f626c Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 28 Feb 2012 13:54:26 +0100 Subject: [PATCH] display 'category' in priority, 'type' otherwise --- weboob/applications/boobank/boobank.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/weboob/applications/boobank/boobank.py b/weboob/applications/boobank/boobank.py index 4ecb8ccd..f2ed3c61 100644 --- a/weboob/applications/boobank/boobank.py +++ b/weboob/applications/boobank/boobank.py @@ -65,16 +65,16 @@ class TransactionsFormatter(IFormatter): result = u'' if self.count == 1: - result += ' Date Type Label Amount \n' + result += ' Date Category Label Amount \n' result += '------------+------------+---------------------------------------------------+-----------\n' - try: - _type = self.TYPES[item['type']] - except IndexError: - _type = '' - - if not _type and item['category']: + if item['category']: _type = item['category'] + else: + try: + _type = self.TYPES[item['type']] + except IndexError: + _type = '' label = item['label'] if not label: