mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Work around flake8 issues
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user