Bugfix: ceil up page count to prevent page 1/0
This commit is contained in:
parent
d59f1908b0
commit
07a9b5f77c
|
@ -1 +1 @@
|
||||||
v0.1-0-gc44d7e4
|
v0.1-1-gd59f190
|
||||||
|
|
|
@ -109,7 +109,10 @@ pub fn get_selection_context(
|
||||||
}
|
}
|
||||||
|
|
||||||
let last_page = match member_count(settings,selected_groups.clone()){
|
let last_page = match member_count(settings,selected_groups.clone()){
|
||||||
Ok(count) => count/entries_per_page,
|
Ok(count) => {
|
||||||
|
let c = count as f64 / entries_per_page as f64;
|
||||||
|
c.ceil() as i64
|
||||||
|
},
|
||||||
Err(e) => return Err(Status::InternalServerError)
|
Err(e) => return Err(Status::InternalServerError)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue