From cb9ca0040870aa012b4909300cdb5d40a89a389f Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 10 Sep 2018 13:50:03 +0300 Subject: [PATCH 1/5] Button title changed --- apps/school/templates/blocks/open_lesson.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/school/templates/blocks/open_lesson.html b/apps/school/templates/blocks/open_lesson.html index abb8a9a2..46999c7f 100644 --- a/apps/school/templates/blocks/open_lesson.html +++ b/apps/school/templates/blocks/open_lesson.html @@ -1,4 +1,4 @@ подробнее +>смотреть урок From 0c2bffb8bf159e708f5149f7fdfdbd6ddc0d8ad4 Mon Sep 17 00:00:00 2001 From: gzbender Date: Wed, 12 Sep 2018 14:45:40 +0500 Subject: [PATCH 2/5] LIL-633 --- apps/payment/models.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/payment/models.py b/apps/payment/models.py index 21e6171f..761021bc 100644 --- a/apps/payment/models.py +++ b/apps/payment/models.py @@ -193,8 +193,9 @@ class CoursePayment(Payment): verbose_name_plural = 'Платежи за курсы' def save(self, *args, **kwargs): - amount_data = Payment.calc_amount(course_payment=self) - self.amount = amount_data.get('amount') + if self.status is None: + amount_data = Payment.calc_amount(course_payment=self) + self.amount = amount_data.get('amount') super().save(*args, **kwargs) author_balance = getattr(self, 'authorbalance', None) if not author_balance: @@ -226,8 +227,9 @@ class SchoolPayment(Payment): return days def save(self, *args, **kwargs): - amount_data = Payment.calc_amount(school_payment=self) - self.amount = amount_data.get('amount') + if self.status is None: + amount_data = Payment.calc_amount(school_payment=self) + self.amount = amount_data.get('amount') super().save(*args, **kwargs) @property From 610c0581b2c378a1b07759ee82320b5075f71e2a Mon Sep 17 00:00:00 2001 From: gzbender Date: Wed, 12 Sep 2018 17:59:53 +0500 Subject: [PATCH 3/5] LIL-633 --- apps/payment/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/payment/views.py b/apps/payment/views.py index bb352346..09ac590d 100644 --- a/apps/payment/views.py +++ b/apps/payment/views.py @@ -1,3 +1,5 @@ +from decimal import Decimal + import arrow import json import logging @@ -206,7 +208,7 @@ class PaymentwallCallbackView(View): effective_amount = payment_raw_data.get('effective_price_amount') if effective_amount: - payment.amount = effective_amount + payment.amount = Decimal(effective_amount) transaction_to_mixpanel.delay( payment.user.id, From 4759617265f0c7d10867a6102d50cdbf89c7ce75 Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 12 Sep 2018 16:13:28 +0300 Subject: [PATCH 4/5] Author Balance Fix --- api/v1/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/views.py b/api/v1/views.py index 7620244b..d5dae90d 100644 --- a/api/v1/views.py +++ b/api/v1/views.py @@ -72,7 +72,7 @@ User = get_user_model() class AuthorBalanceViewSet(ExtendedModelViewSet): queryset = AuthorBalance.objects.filter( - author__role__in=[User.AUTHOR_ROLE, User.ADMIN_ROLE], + author__role__in=[User.AUTHOR_ROLE, User.ADMIN_ROLE, User.TEACHER_ROLE], ) serializer_class = AuthorBalanceCreateSerializer serializer_class_map = { From 40874b903d18137c2ae25a56f104f449857d5026 Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 12 Sep 2018 18:17:43 +0300 Subject: [PATCH 5/5] LIL-663 --- apps/school/templates/school/summer_school.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/school/templates/school/summer_school.html b/apps/school/templates/school/summer_school.html index 00da0bf8..0f0c1fe4 100644 --- a/apps/school/templates/school/summer_school.html +++ b/apps/school/templates/school/summer_school.html @@ -1,6 +1,6 @@ {% extends "templates/lilcity/index.html" %} {% load static %} {% block title %}Онлайн-школа LilCity{% endblock title%} -{% block ogimage %}http://{{request.META.HTTP_HOST}}{% static 'img/og_summer_school.jpg' %}{% endblock %} +{% block ogimage %}http://{{request.META.HTTP_HOST}}{% static 'img/og_main.jpg' %}{% endblock %} {% block content %} {% if not is_purchased %} {% include "../summer/promo.html" %}