This commit is contained in:
parent
e4943f524c
commit
3b3cc1c1d8
|
@ -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}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user