Work around flake8 issues

This commit is contained in:
Raphael Michel
2019-01-30 08:59:58 +01:00
parent f35c2544b6
commit d680937a6c
2 changed files with 9 additions and 9 deletions

View File

@@ -269,14 +269,14 @@ def charge_webhook(event, event_json, charge_id, rso):
except Quota.QuotaExceededException:
pass
elif charge['status'] == 'failed' and payment.state in (OrderPayment.PAYMENT_STATE_PENDING, OrderPayment.PAYMENT_STATE_CREATED):
payment.info = str(charge)
payment.state = OrderPayment.PAYMENT_STATE_FAILED
payment.save()
payment.order.log_action('pretix.event.order.payment.failed', {
'local_id': payment.local_id,
'provider': payment.provider,
'info': str(charge)
})
payment.info = str(charge)
payment.state = OrderPayment.PAYMENT_STATE_FAILED
payment.save()
payment.order.log_action('pretix.event.order.payment.failed', {
'local_id': payment.local_id,
'provider': payment.provider,
'info': str(charge)
})
return HttpResponse(status=200)

View File

@@ -1,5 +1,5 @@
[flake8]
ignore = N802,W503,E402,C901,E722,W504,E252
ignore = N802,W503,E402,C901,E722,W504,E252,N812
max-line-length = 160
exclude = migrations,.ropeproject,static,mt940.py,_static,build,make_testdata.py,*/testutils/settings.py,tests/settings.py,pretix/base/models/__init__.py
max-complexity = 11