Use Instance::get_locals() in ensure_local_instance_keys()

This commit is contained in:
Kitaiti Makoto 2021-09-12 03:57:30 +09:00
parent 1ed60537cf
commit a3623412f9

View File

@ -302,8 +302,10 @@ pub fn migrate_data(dbpool: &DbPool) -> Result<()> {
}
fn ensure_local_instance_keys(conn: &Connection) -> Result<()> {
let instance = Instance::get_local()?;
instance.set_keypair(conn)
for instance in Instance::get_locals(conn)? {
instance.set_keypair(conn)?;
}
Ok(())
}
#[cfg(test)]