Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulrahman1s committed Jun 8, 2022
1 parent 797838f commit fb2283d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/guards/ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Ref {
}

pub async fn role(&self, server_id: u64) -> Result<Role> {
let role = Role::find_one_by_id(self.0).await;
let role = Role::find_one(|q| q.eq("id", self.0).eq("server_id", server_id)).await;
match role {
Some(r) => Ok(r),
_ => Err(Error::UnknownRole),
Expand Down

0 comments on commit fb2283d

Please sign in to comment.