This commit is contained in:
parent
4cd8883d72
commit
bde3211a5f
|
@ -289,7 +289,7 @@ async def update_draft(_, info, draft_id: int, draft_input):
|
||||||
draft_dict = draft.dict()
|
draft_dict = draft.dict()
|
||||||
draft_dict["topics"] = [topic.dict() for topic in draft.topics]
|
draft_dict["topics"] = [topic.dict() for topic in draft.topics]
|
||||||
draft_dict["authors"] = [author.dict() for author in draft.authors]
|
draft_dict["authors"] = [author.dict() for author in draft.authors]
|
||||||
|
draft_dict["updated_by"] = author_id
|
||||||
return {"draft": draft_dict}
|
return {"draft": draft_dict}
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -465,7 +465,9 @@ async def publish_draft(_, info, draft_id: int):
|
||||||
await notify_shout(shout.dict(), "update")
|
await notify_shout(shout.dict(), "update")
|
||||||
|
|
||||||
session.commit()
|
session.commit()
|
||||||
return {"shout": shout}
|
shout_dict = shout.dict()
|
||||||
|
shout_dict["updated_by"] = author_id
|
||||||
|
return {"shout": shout_dict}
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to publish shout: {e}", exc_info=True)
|
logger.error(f"Failed to publish shout: {e}", exc_info=True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user