schema-fix
All checks were successful
Deploy on push / deploy (push) Successful in 6s

This commit is contained in:
2025-06-30 22:43:32 +03:00
parent 41395eb7c6
commit ab65fd4fd8
7 changed files with 163 additions and 86 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any
from typing import Any, Optional
from graphql import GraphQLResolveInfo
@@ -211,8 +211,8 @@ async def delete_collection(_: None, info: GraphQLResolveInfo, slug: str) -> dic
@type_collection.field("created_by")
def resolve_collection_created_by(obj: Collection, *_: Any) -> Author:
"""Резолвер для поля created_by коллекции"""
def resolve_collection_created_by(obj: Collection, *_: Any) -> Optional[Author]:
"""Резолвер для поля created_by коллекции (может вернуть None)"""
with local_session() as session:
if hasattr(obj, "created_by_author") and obj.created_by_author:
return obj.created_by_author