diff --git a/apps/user/models.py b/apps/user/models.py index 11cb5c2d..4ae7e2f8 100644 --- a/apps/user/models.py +++ b/apps/user/models.py @@ -151,11 +151,12 @@ class User(AbstractUser): @property def paid_one_more(self): - from apps.payment.models import SchoolPayment, CoursePayment, Payment - school_payments_cnt = SchoolPayment.objects.filter(status__in=Payment.PW_PAID_STATUSES, user=self, + from apps.payment.models import SchoolPayment, CoursePayment, Payment, DrawingCampPayment + payments_cnt = SchoolPayment.objects.filter(status__in=Payment.PW_PAID_STATUSES, user=self, add_days=False).count() - course_payment_cnt = CoursePayment.objects.filter(status__in=Payment.PW_PAID_STATUSES, user=self).count() - return school_payments_cnt > 1 or course_payment_cnt > 1 or (school_payments_cnt and course_payment_cnt) + payments_cnt += CoursePayment.objects.filter(status__in=Payment.PW_PAID_STATUSES, user=self).count() + payments_cnt += DrawingCampPayment.objects.filter(status__in=Payment.PW_PAID_STATUSES, user=self).count() + return payments_cnt > 1 @receiver(post_save, sender=User)