Skip to content
Snippets Groups Projects
Commit 4223288c authored by Timo Kösters's avatar Timo Kösters
Browse files

Merge branch 'fixbadservernameusers' into 'next'

fix: ignore bad user ids in migration

See merge request famedly/conduit!457
parents 06df04f6 a4f18f99
No related branches found
No related tags found
No related merge requests found
...@@ -800,10 +800,17 @@ pub async fn load_or_create(config: Config) -> Result<()> { ...@@ -800,10 +800,17 @@ pub async fn load_or_create(config: Config) -> Result<()> {
} }
if services().globals.database_version()? < 12 { if services().globals.database_version()? < 12 {
for username in services().users.list_local_users().unwrap() { for username in services().users.list_local_users()? {
let user = let user = match UserId::parse_with_server_name(
UserId::parse_with_server_name(username, services().globals.server_name()) username.clone(),
.unwrap(); services().globals.server_name(),
) {
Ok(u) => u,
Err(e) => {
warn!("Invalid username {username}: {e}");
continue;
}
};
let raw_rules_list = services() let raw_rules_list = services()
.account_data .account_data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment