sqltypes-text
Some checks failed
Deploy on push / deploy (push) Failing after 9s

This commit is contained in:
Untone 2024-08-07 14:29:31 +03:00
parent 19c9ef462e
commit 3fde67a87d

View File

@ -1,7 +1,7 @@
from typing import List
from sqlalchemy.orm import aliased, selectinload, joinedload
from sqlalchemy.sql import union
from sqlalchemy.dialects.postgresql.types import CITEXT
from sqlalchemy.dialects.postgresql.types import sqltypes
from sqlalchemy.sql.expression import (
and_,
asc,
@ -61,7 +61,7 @@ def query_shouts():
Author.slug,
"pic",
Author.pic,
).cast(CITEXT) # Преобразуем JSON в текст
).cast(sqltypes.Text) # Преобразуем JSON в текст
)
).label("authors"),
func.array_agg(
@ -75,7 +75,7 @@ def query_shouts():
Topic.body,
"slug",
Topic.slug,
).cast(CITEXT) # Преобразуем JSON в текст
).cast(sqltypes.Text) # Преобразуем JSON в текст
)
).label("topics"),
)