X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fdb_views_actor%2Fsrc%2Fcommunity_person_ban_view.rs;h=ebfce9ba8041a7fb4ffde85b22082f1cd594a98a;hb=985fe24669d3fdeecc0aa76cc74dd6570cbad5c8;hp=0d7df921362714dc5cc3388766f9dd9123e0467d;hpb=48f187188bce9f5fa1ac8ee09615540ee4df8540;p=lemmy.git diff --git a/crates/db_views_actor/src/community_person_ban_view.rs b/crates/db_views_actor/src/community_person_ban_view.rs index 0d7df921..ebfce9ba 100644 --- a/crates/db_views_actor/src/community_person_ban_view.rs +++ b/crates/db_views_actor/src/community_person_ban_view.rs @@ -4,11 +4,7 @@ use diesel_async::RunQueryDsl; use lemmy_db_schema::{ newtypes::{CommunityId, PersonId}, schema::{community, community_person_ban, person}, - source::{ - community::{Community, CommunitySafe}, - person::{Person, PersonSafe}, - }, - traits::ToSafe, + source::{community::Community, person::Person}, utils::{get_conn, DbPool}, }; @@ -22,10 +18,7 @@ impl CommunityPersonBanView { let (community, person) = community_person_ban::table .inner_join(community::table) .inner_join(person::table) - .select(( - Community::safe_columns_tuple(), - Person::safe_columns_tuple(), - )) + .select((community::all_columns, person::all_columns)) .filter(community_person_ban::community_id.eq(from_community_id)) .filter(community_person_ban::person_id.eq(from_person_id)) .filter( @@ -34,7 +27,7 @@ impl CommunityPersonBanView { .or(community_person_ban::expires.gt(now)), ) .order_by(community_person_ban::published) - .first::<(CommunitySafe, PersonSafe)>(conn) + .first::<(Community, Person)>(conn) .await?; Ok(CommunityPersonBanView { community, person })