return-type-fix
Some checks failed
Deploy to core / deploy (push) Failing after 1m30s

This commit is contained in:
2024-02-03 17:31:00 +03:00
parent 18521f3fc5
commit d3b2eddf58
3 changed files with 12 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ from services.search import search_service
@login_required
async def get_shouts_drafts(_, info):
user_id = info.context['user_id']
shouts = []
with local_session() as session:
author = session.query(Author).filter(Author.user == user_id).first()
if author:
@@ -34,7 +35,7 @@ async def get_shouts_drafts(_, info):
.group_by(Shout.id)
)
shouts = [shout for [shout] in session.execute(q).unique()]
return shouts
return shouts
@mutation.field('create_shout')
@@ -189,7 +190,7 @@ async def update_shout(_, info, shout_id, shout_input=None, publish=False):
# main topic
main_topic = shout_input.get('main_topic')
if main_topic:
patch_main_topic(main_topic)
patch_main_topic(session, main_topic, shout)
shout_input['updated_at'] = current_time
shout_input['published_at'] = current_time if publish else None