From ec030d500d80c1323a5564cad529131a264b351f Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 20 Mar 2023 00:19:42 +0900 Subject: [PATCH] Exclude instance user when counting local users --- plume-models/src/users.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/plume-models/src/users.rs b/plume-models/src/users.rs index 8dad4081..76043baf 100644 --- a/plume-models/src/users.rs +++ b/plume-models/src/users.rs @@ -186,6 +186,7 @@ impl User { pub fn count_local(conn: &Connection) -> Result { users::table .filter(users::instance_id.eq(Instance::get_local()?.id)) + .filter(users::role.ne(Role::Instance as i32)) .count() .get_result(conn) .map_err(Error::from)