create-shout-fix

This commit is contained in:
2025-01-21 18:19:25 +03:00
parent 562ce3296e
commit 1ed185a701
2 changed files with 14 additions and 7 deletions

View File

@@ -114,7 +114,12 @@ async def create_shout(_, info, inp):
logger.info(f"Creating shout with slug: {slug}")
# Создаем объект Shout напрямую, без промежуточного словаря
new_shout = Shout(**inp)
new_shout = Shout({
**inp,
"slug": slug,
"created_by": author_id,
"created_at": current_time
})
# Check for duplicate slug
logger.debug(f"Checking for existing slug: {slug}")