Remove user_number from inbound sms dao

This commit is contained in:
Ken Tsang
2017-11-09 15:23:16 +00:00
parent 61a9f6e950
commit 36fb2fb28c

View File

@@ -34,7 +34,6 @@ def dao_get_inbound_sms_for_service(service_id, limit=None, user_number=None):
def dao_get_paginated_inbound_sms_for_service( def dao_get_paginated_inbound_sms_for_service(
service_id, service_id,
user_number=None,
older_than=None, older_than=None,
page_size=None page_size=None
): ):
@@ -48,9 +47,6 @@ def dao_get_paginated_inbound_sms_for_service(
InboundSms.created_at).filter(InboundSms.id == older_than).as_scalar() InboundSms.created_at).filter(InboundSms.id == older_than).as_scalar()
filters.append(InboundSms.created_at < older_than_created_at) filters.append(InboundSms.created_at < older_than_created_at)
if user_number:
filters.append(InboundSms.user_number == user_number)
query = InboundSms.query.filter(*filters) query = InboundSms.query.filter(*filters)
return query.order_by(desc(InboundSms.created_at)).paginate( return query.order_by(desc(InboundSms.created_at)).paginate(