we don't try to parse transactions without currencyCode anymore

This commit is contained in:
Baptiste Delpey 2015-03-09 13:54:45 +01:00 committed by Romain Bignon
commit 15b9e1d10c

View file

@ -125,14 +125,11 @@ class PartHistoryPage(Page):
raw = transaction.get('counterparty', transaction['displayType'])
t.parse(date=date, raw=raw)
if transaction['currencyCode'] != account.currency:
transaction = self.browser.convert_amount(account, transaction)
try:
try:
if transaction['currencyCode'] != account.currency:
transaction = self.browser.convert_amount(account, transaction)
t.original_amount = self.format_amount(transaction['originalAmount'], transaction["isCredit"])
t.original_currency = transaction["currencyCode"]
except KeyError:
return
try:
t.amount = self.format_amount(transaction['netAmount'], transaction["isCredit"])
except KeyError:
return