Remove join to image_details in post_view.rs

This commit is contained in:
Felix Ableitner 2024-10-18 15:42:37 +02:00
parent 10a28e78d9
commit 45b21553ac
2 changed files with 1 additions and 6 deletions

View file

@ -28,7 +28,6 @@ use lemmy_db_schema::{
community_follower, community_follower,
community_moderator, community_moderator,
community_person_ban, community_person_ban,
image_details,
instance_block, instance_block,
local_user, local_user,
local_user_language, local_user_language,
@ -219,7 +218,6 @@ fn queries<'a>() -> Queries<
.inner_join(person::table) .inner_join(person::table)
.inner_join(community::table) .inner_join(community::table)
.inner_join(post::table) .inner_join(post::table)
.left_join(image_details::table.on(post::thumbnail_url.eq(image_details::link.nullable())))
.left_join( .left_join(
post_saved::table.on( post_saved::table.on(
post_aggregates::post_id post_aggregates::post_id
@ -231,7 +229,6 @@ fn queries<'a>() -> Queries<
post::all_columns, post::all_columns,
person::all_columns, person::all_columns,
community::all_columns, community::all_columns,
image_details::all_columns.nullable(),
is_creator_banned_from_community, is_creator_banned_from_community,
is_local_user_banned_from_community_selection, is_local_user_banned_from_community_selection,
creator_is_moderator, creator_is_moderator,
@ -1712,7 +1709,6 @@ mod tests {
public_key: inserted_person.public_key.clone(), public_key: inserted_person.public_key.clone(),
last_refreshed_at: inserted_person.last_refreshed_at, last_refreshed_at: inserted_person.last_refreshed_at,
}, },
image_details: None,
creator_banned_from_community: false, creator_banned_from_community: false,
banned_from_community: false, banned_from_community: false,
creator_is_moderator: false, creator_is_moderator: false,

View file

@ -8,7 +8,7 @@ use lemmy_db_schema::{
community::Community, community::Community,
custom_emoji::CustomEmoji, custom_emoji::CustomEmoji,
custom_emoji_keyword::CustomEmojiKeyword, custom_emoji_keyword::CustomEmojiKeyword,
images::{ImageDetails, LocalImage}, images::LocalImage,
local_site::LocalSite, local_site::LocalSite,
local_site_rate_limit::LocalSiteRateLimit, local_site_rate_limit::LocalSiteRateLimit,
local_user::LocalUser, local_user::LocalUser,
@ -131,7 +131,6 @@ pub struct PostView {
pub post: Post, pub post: Post,
pub creator: Person, pub creator: Person,
pub community: Community, pub community: Community,
pub image_details: Option<ImageDetails>,
pub creator_banned_from_community: bool, pub creator_banned_from_community: bool,
pub banned_from_community: bool, pub banned_from_community: bool,
pub creator_is_moderator: bool, pub creator_is_moderator: bool,