Skip to content

Commit 40d8153

Browse files
rkuo-danswerRichard Kuo (Onyx)
authored andcommitted
database isn't a var! (onyx-dot-app#4741)
Co-authored-by: Richard Kuo (Onyx) <rkuo@onyx.app>
1 parent 9bfe222 commit 40d8153

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/onyx/auth/users.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ async def create(
306306
db_session, User, OAuthAccount
307307
)
308308
self.user_db = tenant_user_db
309-
self.database = tenant_user_db # is this even a real var?
310309

311310
if hasattr(user_create, "role"):
312311
user_create.role = UserRole.BASIC
@@ -415,12 +414,13 @@ async def oauth_callback(
415414
verify_email_in_whitelist(account_email, tenant_id)
416415
verify_email_domain(account_email)
417416

417+
# NOTE(rkuo): If this UserManager is instantiated per connection
418+
# should we even be doing this here?
418419
if MULTI_TENANT:
419420
tenant_user_db = SQLAlchemyUserAdminDB[User, uuid.UUID](
420421
db_session, User, OAuthAccount
421422
)
422423
self.user_db = tenant_user_db
423-
self.database = tenant_user_db
424424

425425
oauth_account_dict = {
426426
"oauth_name": oauth_name,

0 commit comments

Comments
 (0)