mirror of https://github.com/LemmyNet/lemmy.git
no need to set site language or default language for new user anymore
parent
074e675651
commit
9c48bce483
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue