mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
remove duplicate dao invite fns and improve naming
This commit is contained in:
@@ -9,7 +9,7 @@ def save_invited_user(invited_user):
|
||||
db.session.commit()
|
||||
|
||||
|
||||
def get_invited_user(service_id, invited_user_id):
|
||||
def get_invited_user_by_service_and_id(service_id, invited_user_id):
|
||||
return InvitedUser.query.filter_by(service_id=service_id, id=invited_user_id).one()
|
||||
|
||||
|
||||
|
||||
@@ -2,13 +2,7 @@ from sqlalchemy.sql.expression import func
|
||||
|
||||
from app import db
|
||||
from app.dao.dao_utils import VersionOptions, transactional, version_class
|
||||
from app.models import (
|
||||
Domain,
|
||||
InvitedOrganisationUser,
|
||||
Organisation,
|
||||
Service,
|
||||
User,
|
||||
)
|
||||
from app.models import Domain, Organisation, Service, User
|
||||
|
||||
|
||||
def dao_get_organisations():
|
||||
@@ -125,10 +119,6 @@ def dao_add_service_to_organisation(service, organisation_id):
|
||||
db.session.add(service)
|
||||
|
||||
|
||||
def dao_get_invited_organisation_user(user_id):
|
||||
return InvitedOrganisationUser.query.filter_by(id=user_id).one()
|
||||
|
||||
|
||||
def dao_get_users_for_organisation(organisation_id):
|
||||
return db.session.query(
|
||||
User
|
||||
|
||||
Reference in New Issue
Block a user