mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-06-05 17:51:30 +00:00
Merge branch 'fixbadservernameusers' into 'next'
fix: ignore bad user ids in migration See merge request famedly/conduit!457
This commit is contained in:
+11
-4
@@ -800,10 +800,17 @@ pub async fn load_or_create(config: Config) -> Result<()> {
|
||||
}
|
||||
|
||||
if services().globals.database_version()? < 12 {
|
||||
for username in services().users.list_local_users().unwrap() {
|
||||
let user =
|
||||
UserId::parse_with_server_name(username, services().globals.server_name())
|
||||
.unwrap();
|
||||
for username in services().users.list_local_users()? {
|
||||
let user = match UserId::parse_with_server_name(
|
||||
username.clone(),
|
||||
services().globals.server_name(),
|
||||
) {
|
||||
Ok(u) => u,
|
||||
Err(e) => {
|
||||
warn!("Invalid username {username}: {e}");
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
let raw_rules_list = services()
|
||||
.account_data
|
||||
|
||||
Reference in New Issue
Block a user