From 9c65d62b627f463b8d962193224e06cc7fae3c95 Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Tue, 30 Jan 2024 17:15:56 +0000 Subject: [PATCH] Fix #1282 include archived plans in calculating active subscribers --- subscribie/blueprints/admin/stats.py | 1 + 1 file changed, 1 insertion(+) diff --git a/subscribie/blueprints/admin/stats.py b/subscribie/blueprints/admin/stats.py index 034ae9ab..06bec3f3 100644 --- a/subscribie/blueprints/admin/stats.py +++ b/subscribie/blueprints/admin/stats.py @@ -15,6 +15,7 @@ def get_number_of_active_subscribers(): .join(Plan, Subscription.sku_uuid == Plan.uuid) .join(PlanRequirements, Plan.id == PlanRequirements.plan_id) .filter(PlanRequirements.subscription == 1) + .execution_options(include_archived=True) ) # Check if their subscriptions are active for subscriber in subscribers_with_subscriptions: