Merge branch 'hotfix/camp-school-fix-1-06-19' into 'master'

не показывает прошлые уроки по окончанию школы

See merge request lilschool/site!310
remotes/origin/feature/buy-email-5-06-19
Danil 7 years ago
commit 4faf6f6aed
  1. 2
      apps/school/views.py
  2. 4
      apps/user/views.py

@ -289,7 +289,7 @@ class DrawingCampView(TemplateView):
next_schedule = school_schedule
next_lesson_start = next_schedule.start_at_humanize
if not next_schedule:
next_camp_lesson = LiveLesson.objects.filter(date__gt=date_now, is_camp=True).first()
next_camp_lesson = LiveLesson.objects.filter(date__gt=date_now, is_camp=True).order_by('date').first()
if next_camp_lesson and next_camp_lesson.school_schedule:
next_schedule = next_camp_lesson.school_schedule
next_lesson_start = arrow.get(datetime.combine(next_camp_lesson.date, next_schedule.start_at),

@ -73,7 +73,7 @@ class ProfileView(TemplateView):
).distinct()
school_payment = SchoolPayment.objects.filter(
user=self.object,
date_end__gte=now(),
date_end__gte=now() - timedelta(7),
status__in=[
Pingback.PINGBACK_TYPE_REGULAR,
Pingback.PINGBACK_TYPE_GOODWILL,
@ -93,7 +93,7 @@ class ProfileView(TemplateView):
camp_payment = DrawingCampPayment.objects.filter(
user=self.object,
date_end__gte=now(),
date_end__gte=now() - timedelta(7),
status__in=DrawingCampPayment.PW_PAID_STATUSES,
)
context['is_camp_purchased'] = camp_payment.exists()

Loading…
Cancel
Save