mirror of
https://github.com/LemmyNet/lemmy
synced 2024-09-20 06:22:08 +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?;
|
.await?;
|
||||||
|
|
||||||
// cant schedule a post which is already published
|
// cant schedule a post which is already published
|
||||||
let mut scheduled_publish_time = if orig_post.scheduled_publish_time.is_some() {
|
let scheduled_publish_time = if orig_post.scheduled_publish_time.is_some() {
|
||||||
convert_published_time(data.scheduled_publish_time)?;
|
Some(convert_published_time(data.scheduled_publish_time)?)
|
||||||
} else {
|
} else {
|
||||||
None;
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
let post_form = PostUpdateForm {
|
let post_form = PostUpdateForm {
|
||||||
|
@ -125,7 +125,7 @@ pub async fn update_post(
|
||||||
nsfw: data.nsfw,
|
nsfw: data.nsfw,
|
||||||
language_id: data.language_id,
|
language_id: data.language_id,
|
||||||
updated: Some(Some(naive_now())),
|
updated: Some(Some(naive_now())),
|
||||||
scheduled_publish_time: Some(scheduled_publish_time),
|
scheduled_publish_time,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue