mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 16:01:15 -05:00
17 lines
406 B
Python
17 lines
406 B
Python
|
|
from app import db
|
||
|
|
from app.models import ServiceContactList
|
||
|
|
|
||
|
|
|
||
|
|
def dao_get_contact_lists(service_id):
|
||
|
|
contact_lists = ServiceContactList.query.filter_by(
|
||
|
|
service_id=service_id
|
||
|
|
).order_by(
|
||
|
|
ServiceContactList.created_at.desc()
|
||
|
|
)
|
||
|
|
return contact_lists.all()
|
||
|
|
|
||
|
|
|
||
|
|
def save_service_contact_list(service_contact_list):
|
||
|
|
db.session.add(service_contact_list)
|
||
|
|
db.session.commit()
|