fix: allow manual article publishing
This commit is contained in:
parent
fb16018e3c
commit
e553283df6
1 changed files with 0 additions and 4 deletions
|
|
@ -806,10 +806,6 @@ def publish_article(
|
|||
article = session.get(Article, article_id)
|
||||
if not article:
|
||||
raise HTTPException(status_code=404, detail="Article not found")
|
||||
try:
|
||||
validate_article_content(article.title, article.lead, article.body_html)
|
||||
except RuntimeError as exc:
|
||||
raise HTTPException(status_code=422, detail=str(exc)) from exc
|
||||
published_at = payload.publishedAt if payload and payload.publishedAt else datetime.now(timezone.utc)
|
||||
if published_at.tzinfo is None:
|
||||
published_at = published_at.replace(tzinfo=timezone.utc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue