From ef11a6ca3795c91221272a1aabfc51741002b75a Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 6 Jul 2023 06:27:25 -0400 Subject: [PATCH] Fixes wrong community moderator ordering. (#3495) --- crates/db_views_actor/src/community_moderator_view.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/db_views_actor/src/community_moderator_view.rs b/crates/db_views_actor/src/community_moderator_view.rs index afdfbfb28..63b4a5a5f 100644 --- a/crates/db_views_actor/src/community_moderator_view.rs +++ b/crates/db_views_actor/src/community_moderator_view.rs @@ -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::(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::(conn) .await?;