Handle sender in reference separated by double spaces

This commit is contained in:
Mark Veidemanis 2022-06-14 17:14:00 +01:00
parent 38dbd5a3f9
commit 9200d0db9b
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 8 additions and 0 deletions

View File

@ -65,6 +65,14 @@ class Transactions(util.Base):
elif "meta" in data: elif "meta" in data:
if "debtor_account_name" in data["meta"]: if "debtor_account_name" in data["meta"]:
return data["meta"]["debtor_account_name"] return data["meta"]["debtor_account_name"]
elif " " in data["reference"]:
refsplit = data["reference"].split(" ")
if not len(refsplit) == 2:
self.log.error(f"Sender cannot be extracted: {data}")
return "not_set"
realname, part2 = data["reference"].split(" ")
return realname
return "not_set" return "not_set"
def reference_partial_check(self, reference, txid, currency, amount): def reference_partial_check(self, reference, txid, currency, amount):