query = query.filter(post::community_id.eq(community_id));
}
- if options.unresolved_only.unwrap_or(false) {
+ if options.unresolved_only {
query = query.filter(post_report::resolved.eq(false));
}
pub community_id: Option<CommunityId>,
pub page: Option<i64>,
pub limit: Option<i64>,
- pub unresolved_only: Option<bool>,
+ pub unresolved_only: bool,
}
impl PostReportQuery {
// Do a batch read of timmys reports
// It should only show saras, which is unresolved
let reports_after_resolve = PostReportQuery {
- unresolved_only: (Some(true)),
+ unresolved_only: (true),
..Default::default()
}
.list(pool, &inserted_timmy)