forked from CGM_Public/pretix_original
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:
|
except Quota.QuotaExceededException:
|
||||||
pass
|
pass
|
||||||
elif charge['status'] == 'failed' and payment.state in (OrderPayment.PAYMENT_STATE_PENDING, OrderPayment.PAYMENT_STATE_CREATED):
|
elif charge['status'] == 'failed' and payment.state in (OrderPayment.PAYMENT_STATE_PENDING, OrderPayment.PAYMENT_STATE_CREATED):
|
||||||
payment.info = str(charge)
|
payment.info = str(charge)
|
||||||
payment.state = OrderPayment.PAYMENT_STATE_FAILED
|
payment.state = OrderPayment.PAYMENT_STATE_FAILED
|
||||||
payment.save()
|
payment.save()
|
||||||
payment.order.log_action('pretix.event.order.payment.failed', {
|
payment.order.log_action('pretix.event.order.payment.failed', {
|
||||||
'local_id': payment.local_id,
|
'local_id': payment.local_id,
|
||||||
'provider': payment.provider,
|
'provider': payment.provider,
|
||||||
'info': str(charge)
|
'info': str(charge)
|
||||||
})
|
})
|
||||||
|
|
||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
ignore = N802,W503,E402,C901,E722,W504,E252
|
ignore = N802,W503,E402,C901,E722,W504,E252,N812
|
||||||
max-line-length = 160
|
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
|
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
|
max-complexity = 11
|
||||||
|
|||||||
Reference in New Issue
Block a user