diff --git a/access/models.py b/access/models.py index 765a8bd..906c62a 100755 --- a/access/models.py +++ b/access/models.py @@ -92,8 +92,6 @@ class CustomUserManager(BaseUserManager): is_recurse=True, ) - thread.subscribers.add(user) - if not password: password = ''.join(random.choice(string.ascii_letters) for x in range(8)) @@ -105,6 +103,7 @@ class CustomUserManager(BaseUserManager): user.save(using=self._db) Account.objects.create(owner=user) + thread.subscribers.add(user) if role_list: for group in role_list: diff --git a/csv/load_bills.py b/csv/load_bills.py index dc4c755..341f480 100644 --- a/csv/load_bills.py +++ b/csv/load_bills.py @@ -59,6 +59,7 @@ if __name__ == '__main__': customer_number=bill.user.id, user=bill.user, cps_email=bill.user.email, + shop_amount=inv.real_price, ) inv.yandex_pay = yandex_pay diff --git a/finance/views.py b/finance/views.py index 963a32e..e1ec957 100644 --- a/finance/views.py +++ b/finance/views.py @@ -53,6 +53,7 @@ class BillListView(APIView): yandex_pay, _is_create = Payment.objects.get_or_create( order_amount=i['price'], order_number=invoice.id, + shop_amount=invoice.real_price, customer_number=bill_obj.user.id, user=bill_obj.user, cps_email=bill_obj.user.email,