mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Only duplicate title into body for Polls if it's not already in there
This commit is contained in:
parent
7cfe89a92e
commit
ae68eecb65
1 changed files with 1 additions and 1 deletions
|
@ -426,7 +426,7 @@ def save_post(form, post: Post, type: str):
|
|||
|
||||
elif type == 'poll':
|
||||
post.title = form.poll_title.data
|
||||
post.body = form.poll_title.data + '\n' + form.poll_body.data
|
||||
post.body = form.poll_title.data + '\n' + form.poll_body.data if post.title not in form.poll_body.data else form.poll_body.data
|
||||
post.body_html = markdown_to_html(post.body)
|
||||
post.type = POST_TYPE_POLL
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue