mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-10 06:54:12 +00:00
fix
This commit is contained in:
parent
b5e54eb6bb
commit
45846003e2
1 changed files with 4 additions and 4 deletions
|
@ -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()
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue