Merge branch 'fixbadservernameusers' into 'next'
fix: ignore bad user ids in migration See merge request famedly/conduit!457
This commit is contained in:
commit
4223288cdf
1 changed files with 11 additions and 4 deletions
|
@ -800,10 +800,17 @@ impl KeyValueDatabase {
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue