diff --git a/finance/signals.py b/finance/signals.py index 07c038d..9e362bc 100644 --- a/finance/signals.py +++ b/finance/signals.py @@ -24,7 +24,7 @@ def delete_dependencies(instance, **kwargs): if instance.status == 'F': if instance.is_open: - Progress.objects.create( + Progress.objects.get_or_create( course=instance.bill.course, user=instance.bill.user, active_obj=instance.bill.course.get_first(['tutorial', 'task',]) @@ -32,7 +32,7 @@ def delete_dependencies(instance, **kwargs): msg = EmailMessage( 'Ваш платёж прошёл успешно', '''Вам открыт доступ к курсу "%s", вы можете перейти по ссылке и - ознакомиться с материабламиhttps://go.skillbox.ru/course/%s/''' + ознакомиться с материалами https://go.skillbox.ru/course/%s''' % (instance.bill.course.title, instance.bill.course.slug), 'robo@skillbox.ru', [instance.yandex_pay.cps_email], @@ -57,11 +57,10 @@ def delete_dependencies(instance, **kwargs): по курсу "%s" ID платежа: %s. Если не получается решить проблему самостоятельно, ответьте на это письмо, постарайтесь подробно описать последовательность действий, - которую превела к ошибке""" + которая привела к ошибке""" % (instance.bill.user.get_full_name(), instance.bill.course.title, instance.id), - 'robo@skillbox.ru', - cc=[instance.bill.opener.email], - reply_to=["andrey.korolev@skillbox.ru"] + instance.bill.opener.email, + reply_to=["it@skillbox.ru"] ) msg.send()