reaction-by-ашч
All checks were successful
Deploy on push / deploy (push) Successful in 35s

This commit is contained in:
Untone 2025-04-26 15:42:15 +03:00
parent e4943f524c
commit 3b3cc1c1d8

View File

@ -135,8 +135,8 @@ async def create_draft(_, info, draft_input):
# Добавляем текущее время создания # Добавляем текущее время создания
draft_input["created_at"] = int(time.time()) draft_input["created_at"] = int(time.time())
author = session.query(Author).filter(Author.id == author_id).first()
draft = Draft(created_by=author_id, **draft_input) draft = Draft(created_by=author, **draft_input)
session.add(draft) session.add(draft)
session.commit() session.commit()
return {"draft": draft} return {"draft": draft}