fix: allow saving articles before quality validation
This commit is contained in:
parent
9ade413832
commit
fb16018e3c
1 changed files with 0 additions and 4 deletions
|
|
@ -711,10 +711,6 @@ def update_article(article_id: int, payload: ArticleUpdateIn, session: Session =
|
||||||
if signature_html.strip() and body.rstrip().endswith(signature_html.strip()):
|
if signature_html.strip() and body.rstrip().endswith(signature_html.strip()):
|
||||||
body = body[: -len(signature_html.strip())].rstrip()
|
body = body[: -len(signature_html.strip())].rstrip()
|
||||||
lead, body_html = split_lead_and_body(body)
|
lead, body_html = split_lead_and_body(body)
|
||||||
try:
|
|
||||||
validate_article_content(title, lead, body_html)
|
|
||||||
except RuntimeError as exc:
|
|
||||||
raise HTTPException(status_code=422, detail=str(exc)) from exc
|
|
||||||
article.title = title
|
article.title = title
|
||||||
article.lead = lead
|
article.lead = lead
|
||||||
article.body_html = body_html
|
article.body_html = body_html
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue