updated-by-auto-fix
All checks were successful
Deploy on push / deploy (push) Successful in 47s

This commit is contained in:
Untone 2025-04-26 23:46:07 +03:00
parent bde3211a5f
commit 20fd40df0e

View File

@ -289,7 +289,9 @@ 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
# Добавляем объект автора в updated_by
draft_dict["updated_by"] = author_dict
return {"draft": draft_dict}
except Exception as e:
@ -466,7 +468,8 @@ async def publish_draft(_, info, draft_id: int):
session.commit()
shout_dict = shout.dict()
shout_dict["updated_by"] = author_id
# Добавляем объект автора в updated_by
shout_dict["updated_by"] = author_dict
return {"shout": shout_dict}
except Exception as e: