From 961f8f85f062811fb2331a80f48659c7db710515 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 14 Oct 2024 14:11:12 -0700 Subject: [PATCH] fix a method --- app/dao/fact_billing_dao.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/dao/fact_billing_dao.py b/app/dao/fact_billing_dao.py index 616e0e4d1..e7ec89f6e 100644 --- a/app/dao/fact_billing_dao.py +++ b/app/dao/fact_billing_dao.py @@ -31,7 +31,7 @@ def fetch_sms_free_allowance_remainder_until_date(end_date): ) query = ( - db.session.query( + select( AnnualBilling.service_id.label("service_id"), AnnualBilling.free_sms_fragment_limit, billable_units.label("billable_units"), @@ -40,6 +40,7 @@ def fetch_sms_free_allowance_remainder_until_date(end_date): 0, ).label("sms_remainder"), ) + .select_from(AnnualBilling) .outerjoin( # if there are no ft_billing rows for a service we still want to return the annual billing so we can use the # free_sms_fragment_limit)