minor-fixes
Some checks failed
Deploy on push / deploy (push) Failing after 8s

This commit is contained in:
2025-09-01 09:40:52 +03:00
parent 30644f6513
commit 7c066b460a
2 changed files with 7 additions and 21 deletions

View File

@@ -995,11 +995,13 @@ def create_author(**kwargs) -> Author:
"""
author = Author()
# Use setattr to avoid MyPy complaints about Column assignment
author.id = kwargs.get("user_id") # Связь с user_id из системы авторизации
author.slug = kwargs.get("slug") # Идентификатор из системы авторизации
author.created_at = int(time.time())
author.updated_at = int(time.time())
author.name = kwargs.get("name") or kwargs.get("slug") # если не указано
author.update({
"id": kwargs.get("user_id"), # Связь с user_id из системы авторизации
"slug": kwargs.get("slug"), # Идентификатор из системы авторизации
"created_at": int(time.time()),
"updated_at": int(time.time()),
"name": kwargs.get("name") or kwargs.get("slug") # если не указано
})
with local_session() as session:
session.add(author)