Bugfix: ceil up page count to prevent page 1/0

This commit is contained in:
Keanu D?lle 2021-01-02 16:16:55 +01:00
parent d59f1908b0
commit 07a9b5f77c
2 changed files with 5 additions and 2 deletions

View File

@ -1 +1 @@
v0.1-0-gc44d7e4
v0.1-1-gd59f190

View File

@ -109,7 +109,10 @@ pub fn get_selection_context(
}
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)
};