@@ -176,8 +176,8 @@ async def user_create(session: SessionDep, creator: UserCreator, trans: Trans):
176176async def create (session : SessionDep , creator : UserCreator , trans : Trans ):
177177 if check_account_exists (session = session , account = creator .account ):
178178 raise Exception (trans ('i18n_exist' , msg = f"{ trans ('i18n_user.account' )} [{ creator .account } ]" ))
179- if check_email_exists (session = session , email = creator .email ):
180- raise Exception (trans ('i18n_exist' , msg = f"{ trans ('i18n_user.email' )} [{ creator .email } ]" ))
179+ """ if check_email_exists(session=session, email=creator.email):
180+ raise Exception(trans('i18n_exist', msg = f"{trans('i18n_user.email')} [{creator.email}]")) """
181181 if not check_email_format (creator .email ):
182182 raise Exception (trans ('i18n_format_invalid' , key = f"{ trans ('i18n_user.email' )} [{ creator .email } ]" ))
183183 #data = creator.model_dump(exclude_unset=True)
@@ -216,8 +216,8 @@ async def update(session: SessionDep, editor: UserEditor, trans: Trans):
216216 raise Exception (f"User with id [{ editor .id } ] not found!" )
217217 if editor .account != user_model .account :
218218 raise Exception (f"account cannot be changed!" )
219- if editor .email != user_model .email and check_email_exists (session = session , email = editor .email ):
220- raise Exception (trans ('i18n_exist' , msg = f"{ trans ('i18n_user.email' )} [{ editor .email } ]" ))
219+ """ if editor.email != user_model.email and check_email_exists(session=session, email=editor.email):
220+ raise Exception(trans('i18n_exist', msg = f"{trans('i18n_user.email')} [{editor.email}]")) """
221221 if not check_email_format (editor .email ):
222222 raise Exception (trans ('i18n_format_invalid' , key = f"{ trans ('i18n_user.email' )} [{ editor .email } ]" ))
223223 origin_oid : int = user_model .oid
0 commit comments