From c859c5c53aaf6f5ea16d32763534c2e6f6158f84 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 18 Oct 2024 11:03:21 -0700 Subject: [PATCH] fix first paginate method --- app/dao/inbound_sms_dao.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/dao/inbound_sms_dao.py b/app/dao/inbound_sms_dao.py index 6d1c266cb..c7c973ea0 100644 --- a/app/dao/inbound_sms_dao.py +++ b/app/dao/inbound_sms_dao.py @@ -84,9 +84,8 @@ def _insert_inbound_sms_history(subquery, query_limit=10000): InboundSms.provider, ).where(InboundSms.id.in_(subquery_select)) - count_query = select(func.count()).select_from(inbound_sms_query.subquery()).scalar() - print(f"COUNT QUERY {count_query}") - inbound_sms_count = db.session.execute(count_query) or 0 + count_query = select(func.count()).select_from(inbound_sms_query.subquery()) + inbound_sms_count = db.session.execute(count_query).scalar() or 0 while offset < inbound_sms_count: statement = insert(InboundSmsHistory).from_select(