Skip to content

Commit 0f3609c

Browse files
Changed Collection inner class to Settings (#3)
1 parent 9ca6d87 commit 0f3609c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fastapi_users_db_beanie/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class BeanieBaseUser(Generic[ID], Document):
2222
is_superuser: bool = False
2323
is_verified: bool = False
2424

25-
class Collection:
25+
class Settings:
2626
email_collation = Collation("en", strength=2)
2727
indexes = [
2828
IndexModel("email", unique=True),
@@ -69,7 +69,7 @@ async def get_by_email(self, email: str) -> Optional[UP_BEANIE]:
6969
"""Get a single user by email."""
7070
return await self.user_model.find_one(
7171
self.user_model.email == email,
72-
collation=self.user_model.Collection.email_collation,
72+
collation=self.user_model.Settings.email_collation,
7373
)
7474

7575
async def get_by_oauth_account(

0 commit comments

Comments
 (0)