fix 500 error

remotes/origin/revert-6d879fe8
andrey 8 years ago
parent 5f1e130200
commit 5336c2c487
  1. 5
      finance/views.py

@ -19,7 +19,8 @@ from django.utils.html import strip_tags
from courses.models import Course
from courses.api import CourseParamsApi
from finance.models import Bill, Invoice, InvoiceRebilling
from finance.models import Bill, Invoice,
ebilling
from finance.serializers import BillSerializer, InvoiceSerializer
from finance.tasks import setup_periodic_billing
from lms.global_decorators import transaction_decorator
@ -268,7 +269,7 @@ class YandexPay(APIView):
pay = Payment.objects.get(id=pk)
try:
inv = InvoiceRebilling.objects.get(yandex_pay=pay)
except InvoiceRebilling:
except InvoiceRebilling.DoesNotExist:
inv = None
r = requests.post('https://money.yandex.ru/eshop.xml', data={
'shopId': pay.shop_id,

Loading…
Cancel
Save