Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fastapi_users_db_beanie/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class BeanieBaseUser(Generic[ID], Document):
is_superuser: bool = False
is_verified: bool = False

class Collection:
class Settings:
email_collation = Collation("en", strength=2)
indexes = [
IndexModel("email", unique=True),
Expand Down Expand Up @@ -69,7 +69,7 @@ async def get_by_email(self, email: str) -> Optional[UP_BEANIE]:
"""Get a single user by email."""
return await self.user_model.find_one(
self.user_model.email == email,
collation=self.user_model.Collection.email_collation,
collation=self.user_model.Settings.email_collation,
)

async def get_by_oauth_account(
Expand Down