This commit is contained in:
Felix Ableitner 2024-09-18 15:24:44 +02:00
parent b5e54eb6bb
commit 45846003e2

View file

@ -111,10 +111,10 @@ pub async fn update_post(
.await?;
// cant schedule a post which is already published
let mut scheduled_publish_time = if orig_post.scheduled_publish_time.is_some() {
convert_published_time(data.scheduled_publish_time)?;
let scheduled_publish_time = if orig_post.scheduled_publish_time.is_some() {
Some(convert_published_time(data.scheduled_publish_time)?)
} else {
None;
None
};
let post_form = PostUpdateForm {
@ -125,7 +125,7 @@ pub async fn update_post(
nsfw: data.nsfw,
language_id: data.language_id,
updated: Some(Some(naive_now())),
scheduled_publish_time: Some(scheduled_publish_time),
scheduled_publish_time,
..Default::default()
};