summaryrefslogtreecommitdiff
path: root/postgresqleu/trustlypayment/util.py
diff options
context:
space:
mode:
authorMagnus Hagander2016-12-27 15:35:52 +0000
committerMagnus Hagander2016-12-27 15:35:52 +0000
commitb54fcc59aff2272eb610c30f59daebcdc65020c8 (patch)
treec819c3436e845c6e62a778bf1858ca2d41c20f5d /postgresqleu/trustlypayment/util.py
parent102cbf632e787ecd98955058ec56b33263a5d501 (diff)
Don't try to delete non-existing transactions
Diffstat (limited to 'postgresqleu/trustlypayment/util.py')
-rw-r--r--postgresqleu/trustlypayment/util.py2
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