Fixes wrong community moderator ordering. (#3495)

This commit is contained in:
Dessalines 2023-07-06 06:27:25 -04:00 committed by GitHub
parent ce1ffebeb0
commit ef11a6ca37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,8 +17,9 @@ impl CommunityModeratorView {
let res = community_moderator::table
.inner_join(community::table)
.inner_join(person::table)
.select((community::all_columns, person::all_columns))
.filter(community_moderator::community_id.eq(community_id))
.select((community::all_columns, person::all_columns))
.order_by(community_moderator::published)
.load::<CommunityModeratorViewTuple>(conn)
.await?;
@ -30,10 +31,10 @@ impl CommunityModeratorView {
let res = community_moderator::table
.inner_join(community::table)
.inner_join(person::table)
.select((community::all_columns, person::all_columns))
.filter(community_moderator::person_id.eq(person_id))
.filter(community::deleted.eq(false))
.filter(community::removed.eq(false))
.select((community::all_columns, person::all_columns))
.load::<CommunityModeratorViewTuple>(conn)
.await?;