From: Dessalines Date: Thu, 6 Jul 2023 10:27:25 +0000 (-0400) Subject: Fixes wrong community moderator ordering. (#3495) X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/static/%7Bthis.props.site.site.icon%7D?a=commitdiff_plain;h=ef11a6ca3795c91221272a1aabfc51741002b75a;p=lemmy.git Fixes wrong community moderator ordering. (#3495) --- diff --git a/crates/db_views_actor/src/community_moderator_view.rs b/crates/db_views_actor/src/community_moderator_view.rs index afdfbfb2..63b4a5a5 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?;