def warn_subscriptions_not_active(based_on_date=None):
    based_on_date = based_on_date or datetime.date.today()
    subscriptions_not_active = Subscription.objects.filter(
        Q(date_end=None) | Q(date_end__gt=based_on_date),
        date_start__lte=based_on_date,
        is_active=False,
    )
    for subscription in subscriptions_not_active:
        log_accounting_error(subscription % "%s is not active")
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/accounting/tasks.py/warn_subscriptions_not_active/swapped operands of `%`