This commit is contained in:
parent
6920351b82
commit
536c094e72
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user