Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
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
7 changes: 2 additions & 5 deletions src/dispatch/auth/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,8 @@ def create_or_update_organization_role(
def create(*, db_session, organization: str, user_in: (UserRegister | UserCreate)) -> DispatchUser:
"""Creates a new dispatch user."""
# pydantic forces a string password, but we really want bytes
# Handle the case where password may be None (e.g., SSO users)
if user_in.password is not None:
password = bytes(user_in.password, "utf-8")
else:
password = None
password = bytes(user_in.password, "utf-8")

# create the user
user = DispatchUser(
**user_in.model_dump(exclude={"password", "organizations", "projects", "role"}), password=password
Expand Down
Loading