diff --git a/orm/author.py b/orm/author.py index ec0a87aa..5d5ad107 100644 --- a/orm/author.py +++ b/orm/author.py @@ -36,7 +36,7 @@ class Author(Base): # Базовые поля автора id: Mapped[int] = mapped_column(Integer, primary_key=True) - name: Mapped[str | None] = mapped_column(String, nullable=True, comment="Display name") + name: Mapped[str] = mapped_column(String, nullable=False, comment="Display name") slug: Mapped[str] = mapped_column(String, unique=True, comment="Author's slug") bio: Mapped[str | None] = mapped_column(String, nullable=True, comment="Bio") # короткое описание about: Mapped[str | None] = mapped_column( diff --git a/schema/type.graphql b/schema/type.graphql index e83268eb..e3fbda72 100644 --- a/schema/type.graphql +++ b/schema/type.graphql @@ -22,7 +22,7 @@ type AuthorStat { type Author { id: Int! slug: String! - name: String! + name: String! # Обязательное поле pic: String bio: String about: String