From a3623412f9306f525076b330a347f2af000b8505 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sun, 12 Sep 2021 03:57:30 +0900 Subject: [PATCH] Use Instance::get_locals() in ensure_local_instance_keys() --- plume-models/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plume-models/src/lib.rs b/plume-models/src/lib.rs index f5009adc..63bef55b 100755 --- a/plume-models/src/lib.rs +++ b/plume-models/src/lib.rs @@ -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)]