mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 10:28:55 -04:00
fix more tests
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
from sqlalchemy import delete, select
|
||||
|
||||
from app import db
|
||||
from app.models import ServiceGuestList
|
||||
|
||||
|
||||
def dao_fetch_service_guest_list(service_id):
|
||||
return ServiceGuestList.query.filter(
|
||||
ServiceGuestList.service_id == service_id
|
||||
).all()
|
||||
stmt = select(ServiceGuestList).where(ServiceGuestList.service_id == service_id)
|
||||
return db.session.execute(stmt).scalars().all()
|
||||
|
||||
|
||||
def dao_add_and_commit_guest_list_contacts(objs):
|
||||
@@ -14,6 +15,7 @@ def dao_add_and_commit_guest_list_contacts(objs):
|
||||
|
||||
|
||||
def dao_remove_service_guest_list(service_id):
|
||||
return ServiceGuestList.query.filter(
|
||||
ServiceGuestList.service_id == service_id
|
||||
).delete()
|
||||
stmt = delete(ServiceGuestList).where(ServiceGuestList.service_id == service_id)
|
||||
result = db.session.execute(stmt)
|
||||
db.session.commit()
|
||||
return result.rowcount
|
||||
|
||||
Reference in New Issue
Block a user