mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-01 16:51:21 +00:00
fix langs
This commit is contained in:
parent
47105a9c3d
commit
f9d6384e7a
1 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,7 @@ use crate::{
|
|||
newtypes::{DbUrl, LocalUserId, PersonId},
|
||||
schema::{local_user, person, registration_application},
|
||||
source::{
|
||||
actor_language::LocalUserLanguage,
|
||||
local_user::{LocalUser, LocalUserInsertForm, LocalUserUpdateForm},
|
||||
local_user_vote_display_mode::{LocalUserVoteDisplayMode, LocalUserVoteDisplayModeInsertForm},
|
||||
},
|
||||
|
@ -201,6 +202,11 @@ impl Crud for LocalUser {
|
|||
.get_result::<Self>(conn)
|
||||
.await?;
|
||||
|
||||
// TODO: this is necessary for tests, but causes unnecessary db writes in production as languages
|
||||
// are set from accept-language header immediately after. would be good if final languages
|
||||
// could be passed in directly.
|
||||
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 a new issue