diff --git a/resolvers/draft.py b/resolvers/draft.py index 2fcb2213..16d595a0 100644 --- a/resolvers/draft.py +++ b/resolvers/draft.py @@ -289,7 +289,7 @@ async def update_draft(_, info, draft_id: int, draft_input): draft_dict = draft.dict() draft_dict["topics"] = [topic.dict() for topic in draft.topics] draft_dict["authors"] = [author.dict() for author in draft.authors] - + draft_dict["updated_by"] = author_id return {"draft": draft_dict} except Exception as e: @@ -465,7 +465,9 @@ async def publish_draft(_, info, draft_id: int): await notify_shout(shout.dict(), "update") session.commit() - return {"shout": shout} + shout_dict = shout.dict() + shout_dict["updated_by"] = author_id + return {"shout": shout_dict} except Exception as e: logger.error(f"Failed to publish shout: {e}", exc_info=True)