]> Untitled Git - lemmy.git/commitdiff
Fixes wrong community moderator ordering. (#3495)
authorDessalines <dessalines@users.noreply.github.com>
Thu, 6 Jul 2023 10:27:25 +0000 (06:27 -0400)
committerGitHub <noreply@github.com>
Thu, 6 Jul 2023 10:27:25 +0000 (12:27 +0200)
crates/db_views_actor/src/community_moderator_view.rs

index afdfbfb2809e48bb79d530624e8e584e258f0ab0..63b4a5a5f9bab1d83752e65376740cf1fd2c89cc 100644 (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?;