mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 19:31:33 +00:00
* 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));
|
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));
|
query = query.filter(comment_report::resolved.eq(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -592,6 +592,7 @@ mod tests {
|
||||||
.pool(pool)
|
.pool(pool)
|
||||||
.my_person_id(inserted_timmy.id)
|
.my_person_id(inserted_timmy.id)
|
||||||
.admin(false)
|
.admin(false)
|
||||||
|
.unresolved_only(Some(true))
|
||||||
.build()
|
.build()
|
||||||
.list()
|
.list()
|
||||||
.await
|
.await
|
||||||
|
|
|
@ -219,7 +219,7 @@ impl<'a> PostReportQuery<'a> {
|
||||||
query = query.filter(post::community_id.eq(community_id));
|
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));
|
query = query.filter(post_report::resolved.eq(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,6 +581,7 @@ mod tests {
|
||||||
.pool(pool)
|
.pool(pool)
|
||||||
.my_person_id(inserted_timmy.id)
|
.my_person_id(inserted_timmy.id)
|
||||||
.admin(false)
|
.admin(false)
|
||||||
|
.unresolved_only(Some(true))
|
||||||
.build()
|
.build()
|
||||||
.list()
|
.list()
|
||||||
.await
|
.await
|
||||||
|
|
|
@ -112,7 +112,7 @@ impl<'a> PrivateMessageReportQuery<'a> {
|
||||||
))
|
))
|
||||||
.into_boxed();
|
.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));
|
query = query.filter(private_message_report::resolved.eq(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue