Fix poles

This commit is contained in:
Guillermo Roche 2024-09-25 19:28:59 +02:00
parent 58724835ae
commit 8678b3035b
Signed by: groche97
GPG Key ID: 041FB85BEEA4B9B0

View File

@ -162,10 +162,11 @@ impl<'a> DatabasePole{
.unwrap();
statement.bind((1, group_id)).unwrap();
statement.bind((2, date)).unwrap();
match statement.next().unwrap() {
State::Row => statement.read::<i64, _>(0).unwrap(),
State::Done => 0,
let mut ret = 0;
while statement.next().unwrap() == State::Row {
ret += statement.read::<i64, _>(0).unwrap();
}
ret
}
pub fn get_top_users(&self, group_id : &str) -> Vec<(i64,String)>{