* Fix *All* reports not showing. Fixes #2902 * Fix *All* reports not showing. Fixes #2902 * Fixing tests.
This commit is contained in:
parent
ae88f618fd
commit
bb625c3671
3 changed files with 5 additions and 3 deletions
|
@ -208,7 +208,7 @@ impl<'a> CommentReportQuery<'a> {
|
|||
query = query.filter(post::community_id.eq(community_id));
|
||||
}
|
||||
|
||||
if self.unresolved_only.unwrap_or(true) {
|
||||
if self.unresolved_only.unwrap_or(false) {
|
||||
query = query.filter(comment_report::resolved.eq(false));
|
||||
}
|
||||
|
||||
|
@ -592,6 +592,7 @@ mod tests {
|
|||
.pool(pool)
|
||||
.my_person_id(inserted_timmy.id)
|
||||
.admin(false)
|
||||
.unresolved_only(Some(true))
|
||||
.build()
|
||||
.list()
|
||||
.await
|
||||
|
|
|
@ -219,7 +219,7 @@ impl<'a> PostReportQuery<'a> {
|
|||
query = query.filter(post::community_id.eq(community_id));
|
||||
}
|
||||
|
||||
if self.unresolved_only.unwrap_or(true) {
|
||||
if self.unresolved_only.unwrap_or(false) {
|
||||
query = query.filter(post_report::resolved.eq(false));
|
||||
}
|
||||
|
||||
|
@ -581,6 +581,7 @@ mod tests {
|
|||
.pool(pool)
|
||||
.my_person_id(inserted_timmy.id)
|
||||
.admin(false)
|
||||
.unresolved_only(Some(true))
|
||||
.build()
|
||||
.list()
|
||||
.await
|
||||
|
|
|
@ -112,7 +112,7 @@ impl<'a> PrivateMessageReportQuery<'a> {
|
|||
))
|
||||
.into_boxed();
|
||||
|
||||
if self.unresolved_only.unwrap_or(true) {
|
||||
if self.unresolved_only.unwrap_or(false) {
|
||||
query = query.filter(private_message_report::resolved.eq(false));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue