draft-create-fix
All checks were successful
Deploy on push / deploy (push) Successful in 48s

This commit is contained in:
Untone 2025-04-16 11:45:38 +03:00
parent 6920351b82
commit 536c094e72

View File

@ -116,7 +116,7 @@ async def create_draft(_, info, draft_input):
if "id" in draft_input: if "id" in draft_input:
del draft_input["id"] del draft_input["id"]
if "seo" not in draft_input and not draft_input["seo"]: if "seo" not in draft_input and not draft_input.get("seo"):
body_teaser = draft_input.get("body", "")[:300].split("\n")[:-1].join("\n") body_teaser = draft_input.get("body", "")[:300].split("\n")[:-1].join("\n")
draft_input["seo"] = draft_input.get("lead", body_teaser) draft_input["seo"] = draft_input.get("lead", body_teaser)