From 5716c86e8a7c27ecc5d426b38c0e5a05d59cd6c4 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 18 Oct 2024 10:03:46 -0700 Subject: [PATCH] fix first paginate method --- app/dao/inbound_sms_dao.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dao/inbound_sms_dao.py b/app/dao/inbound_sms_dao.py index b143c807e..59fe48735 100644 --- a/app/dao/inbound_sms_dao.py +++ b/app/dao/inbound_sms_dao.py @@ -85,7 +85,7 @@ def _insert_inbound_sms_history(subquery, query_limit=10000): ).where(InboundSms.id.in_(subquery_select)) inbound_sms_count = db.session.execute( - select(func.count()).select_from(inbound_sms_query.subquery()).scalar_one() + select(func.count()).select_from(inbound_sms_query.subquery()).scalar() or 0 ) while offset < inbound_sms_count: