mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
fix delete_inbound_sms_older_than_retention and dao_get_inbound_sms_by_id
This commit is contained in:
@@ -194,7 +194,7 @@ def dao_get_paginated_most_recent_inbound_sms_by_user_number_for_service(
|
|||||||
"""
|
"""
|
||||||
t2 = aliased(InboundSms)
|
t2 = aliased(InboundSms)
|
||||||
stmt = (
|
stmt = (
|
||||||
db.session.query(InboundSms)
|
select(InboundSms)
|
||||||
.outerjoin(
|
.outerjoin(
|
||||||
t2,
|
t2,
|
||||||
and_(
|
and_(
|
||||||
@@ -214,6 +214,7 @@ def dao_get_paginated_most_recent_inbound_sms_by_user_number_for_service(
|
|||||||
limit = current_app.config["PAGE_SIZE"]
|
limit = current_app.config["PAGE_SIZE"]
|
||||||
paginated_stmt = stmt.limit(limit).offset(offset)
|
paginated_stmt = stmt.limit(limit).offset(offset)
|
||||||
result = db.session.execute(paginated_stmt).scalars().all()
|
result = db.session.execute(paginated_stmt).scalars().all()
|
||||||
|
print(f"RESULT {result}")
|
||||||
total_count_stmt = (
|
total_count_stmt = (
|
||||||
select(func.count())
|
select(func.count())
|
||||||
.select_from(InboundSms)
|
.select_from(InboundSms)
|
||||||
|
|||||||
Reference in New Issue
Block a user