From: Dessalines Date: Tue, 14 Feb 2023 21:41:22 +0000 (-0500) Subject: Fixing updated form fields. Fixes #2724 (#2725) X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60%24%7BghostArchiveUrl%7D/static/%7BpictshareAvatarThumbnail%28post.creator_avatar%29%7D?a=commitdiff_plain;h=956d0aa52f62402a5868f2745f14f89df45dd805;p=lemmy.git Fixing updated form fields. Fixes #2724 (#2725) * Fixing updated form fields. Fixes #2724 * Fix import. --- diff --git a/crates/api_crud/src/comment/update.rs b/crates/api_crud/src/comment/update.rs index 88de4115..27d65cbe 100644 --- a/crates/api_crud/src/comment/update.rs +++ b/crates/api_crud/src/comment/update.rs @@ -23,6 +23,7 @@ use lemmy_db_schema::{ local_site::LocalSite, }, traits::Crud, + utils::naive_now, }; use lemmy_db_views::structs::CommentView; use lemmy_utils::{ @@ -92,6 +93,7 @@ impl PerformCrud for EditComment { .content(content_slurs_removed) .distinguished(data.distinguished) .language_id(data.language_id) + .updated(Some(Some(naive_now()))) .build(); let updated_comment = Comment::update(context.pool(), comment_id, &form) .await diff --git a/crates/api_crud/src/community/update.rs b/crates/api_crud/src/community/update.rs index 9059a4a6..6ab16107 100644 --- a/crates/api_crud/src/community/update.rs +++ b/crates/api_crud/src/community/update.rs @@ -14,7 +14,7 @@ use lemmy_db_schema::{ local_site::LocalSite, }, traits::Crud, - utils::{diesel_option_overwrite, diesel_option_overwrite_to_url}, + utils::{diesel_option_overwrite, diesel_option_overwrite_to_url, naive_now}, }; use lemmy_db_views_actor::structs::CommunityModeratorView; use lemmy_utils::{error::LemmyError, utils::check_slurs_opt, ConnectionId}; @@ -70,6 +70,7 @@ impl PerformCrud for EditCommunity { .banner(banner) .nsfw(data.nsfw) .posting_restricted_to_mods(data.posting_restricted_to_mods) + .updated(Some(Some(naive_now()))) .build(); let community_id = data.community_id; diff --git a/crates/api_crud/src/post/update.rs b/crates/api_crud/src/post/update.rs index 9337c595..ecb9bf08 100644 --- a/crates/api_crud/src/post/update.rs +++ b/crates/api_crud/src/post/update.rs @@ -19,7 +19,7 @@ use lemmy_db_schema::{ post::{Post, PostUpdateForm}, }, traits::Crud, - utils::diesel_option_overwrite, + utils::{diesel_option_overwrite, naive_now}, }; use lemmy_utils::{ error::LemmyError, @@ -101,6 +101,7 @@ impl PerformCrud for EditPost { .embed_video_url(embed_video_url) .language_id(data.language_id) .thumbnail_url(Some(thumbnail_url)) + .updated(Some(Some(naive_now()))) .build(); let post_id = data.post_id;