diff options
author | Magnus Hagander | 2016-12-27 15:35:52 +0000 |
---|---|---|
committer | Magnus Hagander | 2016-12-27 15:35:52 +0000 |
commit | b54fcc59aff2272eb610c30f59daebcdc65020c8 (patch) | |
tree | c819c3436e845c6e62a778bf1858ca2d41c20f5d /postgresqleu/trustlypayment/util.py | |
parent | 102cbf632e787ecd98955058ec56b33263a5d501 (diff) |
Don't try to delete non-existing transactions
Diffstat (limited to 'postgresqleu/trustlypayment/util.py')
-rw-r--r-- | postgresqleu/trustlypayment/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/postgresqleu/trustlypayment/util.py b/postgresqleu/trustlypayment/util.py index 7f724046..76dd9e4d 100644 --- a/postgresqleu/trustlypayment/util.py +++ b/postgresqleu/trustlypayment/util.py @@ -122,9 +122,9 @@ class Trustly(TrustlyWrapper): self.log_and_email("Transaction {0} canceled by notification {1} but already in progress. Ignoring cancel!".format(notification.orderid, notification.id)) return False TrustlyLog(message='Transaction {0} canceled from notification'.format(notification.orderid)).save() + trans.delete() except TrustlyTransaction.DoesNotExist: TrustlyLog("Abandoned transaction {0} canceled from notification".format(notification.orderid)) - trans.delete() notification.confirmed = True notification.save() return True |