no need to set site language or default language for new user anymore

user-language-signup
Felix Ableitner 2024-03-21 12:47:04 +01:00
parent 074e675651
commit 9c48bce483
1 changed files with 0 additions and 11 deletions

View File

@ -2,7 +2,6 @@ use crate::{
newtypes::{DbUrl, LocalUserId, PersonId},
schema::{local_user, person, registration_application},
source::{
actor_language::{LocalUserLanguage, SiteLanguage},
local_user::{LocalUser, LocalUserInsertForm, LocalUserUpdateForm},
local_user_vote_display_mode::{LocalUserVoteDisplayMode, LocalUserVoteDisplayModeInsertForm},
},
@ -202,16 +201,6 @@ impl Crud for LocalUser {
.get_result::<Self>(conn)
.await?;
let site_languages = SiteLanguage::read_local_raw(pool).await;
if let Ok(langs) = site_languages {
// if site exists, init user with site languages
LocalUserLanguage::update(pool, langs, local_user_.id).await?;
} else {
// otherwise, init with all languages (this only happens during tests and
// for first admin user, which is created before site)
LocalUserLanguage::update(pool, vec![], local_user_.id).await?;
}
// Create their vote_display_modes
let vote_display_mode_form = LocalUserVoteDisplayModeInsertForm::builder()
.local_user_id(local_user_.id)