Null check to fetch local users
This commit is contained in:
parent
bc95aa4efa
commit
6bf7b17bab
|
@ -35,7 +35,11 @@ impl CalckeyModel {
|
|||
.filter(user::Column::UsernameLower.eq(name))
|
||||
.filter(user::Column::Host.eq(instance))
|
||||
} else {
|
||||
user::Entity::find().filter(user::Column::UsernameLower.eq(name))
|
||||
user::Entity::find().filter(
|
||||
user::Column::UsernameLower
|
||||
.eq(name)
|
||||
.and(user::Column::Host.is_null()),
|
||||
)
|
||||
}
|
||||
.one(&self.0)
|
||||
.await?;
|
||||
|
|
Loading…
Reference in New Issue