diff --git a/project/customer/context_processors.py b/project/customer/context_processors.py index db8b58a..8f029cc 100644 --- a/project/customer/context_processors.py +++ b/project/customer/context_processors.py @@ -47,7 +47,7 @@ def license_check_soon_ends(request): if not license_cookie: if license_15days is None: ending_license = (License.objects - .filter(company=request.user.profile, date_from__lte=now_, + .filter(company=request.user.profile, date_from__lte=now_, date_to__gte=now_, date_to__lte = now_ + timedelta(days=consts.LICENSE_DAYS_BEFORE_EXPIRE), deleted=False) .filter(Q(status__in = [consts.LICENSE_INACTIVE, consts.LICENSE_ACTIVE]) | Q(order_status=consts.ORDER_PAID))[:1] # ближайшая лицензия )