багфикс затирания коммента при ошибке переодической задачи

remotes/origin/dev_fix_pereodic_payment
wad 8 years ago
parent 4850676b6f
commit ff02ba5b16
  1. 4
      finance/tasks.py

@ -27,7 +27,7 @@ def periodic_billing():
_yandex_repeat_card_payment(invoice) _yandex_repeat_card_payment(invoice)
except Exception as exc: except Exception as exc:
finance_logger.exception('Yandex Money repeatCardPayment Exception', invoice_id=invoice.id) finance_logger.exception('Yandex Money repeatCardPayment Exception', invoice_id=invoice.id)
invoice.comment = 'Ошибка при попытке повторного платежа, свяжитесь с клиентской службой' invoice.comment += 'Yandex Money: Ошибка при попытке повторного платежа, свяжитесь с клиентской службой'
invoice.save() invoice.save()
@ -78,4 +78,4 @@ def _check_yandex_response_status(invoice, resp_text):
processed_dt = resp_node.getAttribute('processedDT') processed_dt = resp_node.getAttribute('processedDT')
tech_message = resp_node.getAttribute('techMessage') tech_message = resp_node.getAttribute('techMessage')
invoice.status += Invoice.BILL_STATUSES[-1][0] invoice.status += Invoice.BILL_STATUSES[-1][0]
invoice.comment += 'Yandex Kassa: ошибка № {}, сообщение {} от {}'.format(error, tech_message, processed_dt) invoice.comment += 'Yandex Money: ошибка № {}, сообщение {} от {}'.format(error, tech_message, processed_dt)

Loading…
Cancel
Save