This commit is contained in:
@@ -502,7 +502,11 @@ async def publish_draft(_: None, info: GraphQLResolveInfo, draft_id: int) -> dic
|
||||
logger.info(f"Successfully published shout #{shout.id} from draft #{draft_id}")
|
||||
logger.debug(f"Shout data: {shout.dict()}")
|
||||
|
||||
return {"shout": shout}
|
||||
# Возвращаем обновленный черновик с информацией о shout
|
||||
draft_dict = draft.dict()
|
||||
draft_dict["shout"] = {"id": shout.id, "slug": shout.slug, "published_at": shout.published_at}
|
||||
|
||||
return {"draft": draft_dict}
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to publish draft {draft_id}: {e}", exc_info=True)
|
||||
|
||||
Reference in New Issue
Block a user