mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 15:49:49 -04:00
Merge pull request #1860 from GSA/sqlalchemy_warning
clear up sqlalchemy warning
This commit is contained in:
@@ -128,7 +128,7 @@ def _delete_inbound_sms(datetime_to_delete_from, query_filter):
|
|||||||
while number_deleted > 0:
|
while number_deleted > 0:
|
||||||
_insert_inbound_sms_history(subquery, query_limit=query_limit)
|
_insert_inbound_sms_history(subquery, query_limit=query_limit)
|
||||||
|
|
||||||
stmt = delete(InboundSms).where(InboundSms.id.in_(subquery))
|
stmt = delete(InboundSms).where(InboundSms.id.in_(select(subquery.c.id)))
|
||||||
number_deleted = db.session.execute(stmt).rowcount
|
number_deleted = db.session.execute(stmt).rowcount
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
deleted += number_deleted
|
deleted += number_deleted
|
||||||
|
|||||||
Reference in New Issue
Block a user