credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #00053
[Merge] lp:~credativ/account-banking/fix-read-method into lp:account-banking
Dmitrijs Ledkovs (credativ) has proposed merging lp:~credativ/account-banking/fix-read-method into lp:account-banking.
Requested reviews:
Pieter J. Kersten (EduSense BV) (pieterj)
For more details, see:
https://code.launchpad.net/~credativ/account-banking/fix-read-method/+merge/80792
[FIX] iban read method to accept a single item or a list
web-client sometimes passes a list of ids, or just a single id.
In the latter case a single record is returned, instead of a list of records.
Adjust code to cope with that situation.
--
https://code.launchpad.net/~credativ/account-banking/fix-read-method/+merge/80792
Your team Credativ is subscribed to branch lp:~credativ/account-banking/fix-read-method.
=== modified file 'account_banking/account_banking.py'
--- account_banking/account_banking.py 2011-04-27 11:42:52 +0000
+++ account_banking/account_banking.py 2011-10-31 11:59:23 +0000
@@ -1118,6 +1118,8 @@
Convert IBAN electronic format to IBAN display format
'''
records = self._founder.read(self, *args, **kwargs)
+ if not isinstance(records, list):
+ records = [records,]
for record in records:
if 'iban' in record and record['iban']:
record['iban'] = unicode(sepa.IBAN(record['iban']))