mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 08:51:30 -05:00
adding back a removed comment while sqlalchemy 2.0 upgrade
This commit is contained in:
@@ -191,6 +191,8 @@ def get_user_and_accounts(user_id):
|
|||||||
return (
|
return (
|
||||||
User.query.filter(User.id == user_id)
|
User.query.filter(User.id == user_id)
|
||||||
.options(
|
.options(
|
||||||
|
# eagerly load the user's services and organizations, and also the service's org and vice versa
|
||||||
|
# (so we can see if the user knows about it)
|
||||||
joinedload(User.services).joinedload(Service.organization),
|
joinedload(User.services).joinedload(Service.organization),
|
||||||
joinedload(User.organizations).subqueryload(Organization.services),
|
joinedload(User.organizations).subqueryload(Organization.services),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user