From cd0f61d0788afb454104112e15eec321605c8d7d Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Fri, 15 Nov 2013 15:46:36 +0100 Subject: [PATCH] use raw label to calculate unique_id --- weboob/capabilities/bank.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weboob/capabilities/bank.py b/weboob/capabilities/bank.py index 83aa3a6e..35b47187 100644 --- a/weboob/capabilities/bank.py +++ b/weboob/capabilities/bank.py @@ -20,6 +20,7 @@ from datetime import date, datetime from binascii import crc32 +import re from .base import CapBaseObject, Field, StringField, DateField, DecimalField, IntField, UserError, Currency from .collection import ICapCollection @@ -112,7 +113,7 @@ class Transaction(CapBaseObject): def unique_id(self, seen=None, account_id=None): crc = crc32(str(self.date)) crc = crc32(str(self.amount), crc) - crc = crc32(self.label.encode("utf-8"), crc) + crc = crc32(re.sub('[ ]+', ' ', self.raw.encode("utf-8")), crc) if account_id is not None: crc = crc32(str(account_id), crc)