From cc2090d2f3c56b52ac480c37e720b30f4f9d8520 Mon Sep 17 00:00:00 2001 From: Marc Vilanova <39573146+mvilanova@users.noreply.github.com> Date: Wed, 21 May 2025 09:50:48 -0700 Subject: [PATCH] Update service.py --- src/dispatch/auth/service.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/dispatch/auth/service.py b/src/dispatch/auth/service.py index eddcf0736692..a965222b6d83 100644 --- a/src/dispatch/auth/service.py +++ b/src/dispatch/auth/service.py @@ -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