This commit is contained in:
@@ -444,6 +444,7 @@ async def publish_draft(_: None, info: GraphQLResolveInfo, draft_id: int) -> dic
|
||||
shout = session.query(Shout).where(Shout.id == draft.shout).first()
|
||||
if shout:
|
||||
# Обновляем существующую публикацию
|
||||
now = int(time.time())
|
||||
if hasattr(draft, "body"):
|
||||
shout.body = draft.body
|
||||
if hasattr(draft, "title"):
|
||||
@@ -462,7 +463,9 @@ async def publish_draft(_: None, info: GraphQLResolveInfo, draft_id: int) -> dic
|
||||
shout.lang = draft.lang
|
||||
if hasattr(draft, "seo"):
|
||||
shout.seo = draft.seo
|
||||
shout.updated_at = int(time.time())
|
||||
# 🩵 Критически важно: устанавливаем published_at для обеспечения видимости в списках
|
||||
shout.published_at = now
|
||||
shout.updated_at = now
|
||||
shout.updated_by = author_id
|
||||
else:
|
||||
# Создаем новую публикацию
|
||||
|
||||
Reference in New Issue
Block a user