From 1b0d02fd80e0e246755b330dd5ca9cd9b9f411d7 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 18 Oct 2024 15:42:37 +0200 Subject: [PATCH] Remove join to image_details in post_view.rs --- crates/db_views/src/post_view.rs | 4 ---- crates/db_views/src/structs.rs | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/db_views/src/post_view.rs b/crates/db_views/src/post_view.rs index df6216bf7..42a4d3e61 100644 --- a/crates/db_views/src/post_view.rs +++ b/crates/db_views/src/post_view.rs @@ -28,7 +28,6 @@ use lemmy_db_schema::{ community_follower, community_moderator, community_person_ban, - image_details, instance_block, local_user, local_user_language, @@ -219,7 +218,6 @@ fn queries<'a>() -> Queries< .inner_join(person::table) .inner_join(community::table) .inner_join(post::table) - .left_join(image_details::table.on(post::thumbnail_url.eq(image_details::link.nullable()))) .left_join( post_saved::table.on( post_aggregates::post_id @@ -231,7 +229,6 @@ fn queries<'a>() -> Queries< post::all_columns, person::all_columns, community::all_columns, - image_details::all_columns.nullable(), is_creator_banned_from_community, is_local_user_banned_from_community_selection, creator_is_moderator, @@ -1712,7 +1709,6 @@ mod tests { public_key: inserted_person.public_key.clone(), last_refreshed_at: inserted_person.last_refreshed_at, }, - image_details: None, creator_banned_from_community: false, banned_from_community: false, creator_is_moderator: false, diff --git a/crates/db_views/src/structs.rs b/crates/db_views/src/structs.rs index 3c219d63f..350e4cad4 100644 --- a/crates/db_views/src/structs.rs +++ b/crates/db_views/src/structs.rs @@ -8,7 +8,7 @@ use lemmy_db_schema::{ community::Community, custom_emoji::CustomEmoji, custom_emoji_keyword::CustomEmojiKeyword, - images::{ImageDetails, LocalImage}, + images::LocalImage, local_site::LocalSite, local_site_rate_limit::LocalSiteRateLimit, local_user::LocalUser, @@ -131,7 +131,6 @@ pub struct PostView { pub post: Post, pub creator: Person, pub community: Community, - pub image_details: Option, pub creator_banned_from_community: bool, pub banned_from_community: bool, pub creator_is_moderator: bool,