mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2025-01-02 23:38:49 +00:00
Exclude instance user when counting local users
This commit is contained in:
parent
cfa74f84e7
commit
ec030d500d
1 changed files with 1 additions and 0 deletions
|
@ -186,6 +186,7 @@ impl User {
|
|||
pub fn count_local(conn: &Connection) -> Result<i64> {
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue