Ignore card and negative transactions

master
Mark Veidemanis 3 years ago
parent c28879c0e4
commit 77033c3f09
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -46,6 +46,9 @@ class Transactions(object):
self.log.error("Type not in inside: {inside}", inside=inside)
return
txtype = inside["type"]
if txtype == "card_payment":
self.log.info("Ignoring card payment: {id}", id=txid)
return
state = inside["state"]
if "reference" in inside:
reference = inside["reference"]
@ -60,6 +63,9 @@ class Transactions(object):
account_type = "not_given"
amount = leg["amount"]
if amount <= 0:
self.log.info("Ignoring transaction with negative/zero amount: {id}", id=txid)
return
currency = leg["currency"]
description = leg["description"]

Loading…
Cancel
Save