follow-resolver-fix
Some checks failed
Deploy on push / deploy (push) Failing after 38s

This commit is contained in:
2025-08-30 15:19:43 +03:00
parent 14b0f3a35d
commit dfeadf6a54

View File

@@ -92,6 +92,7 @@ async def follow(
session.query(follower_class) session.query(follower_class)
.where( .where(
follower_class.follower == follower_id, # type: ignore[attr-defined] follower_class.follower == follower_id, # type: ignore[attr-defined]
follower_class.following == entity_id, # type: ignore[attr-defined]
getattr(follower_class, entity_type) == entity_id, # type: ignore[attr-defined] getattr(follower_class, entity_type) == entity_id, # type: ignore[attr-defined]
) )
.first() .first()
@@ -214,7 +215,9 @@ async def unfollow(
.where( .where(
and_( and_(
follower_class.follower == follower_id, # type: ignore[attr-defined] follower_class.follower == follower_id, # type: ignore[attr-defined]
getattr(follower_class, entity_type) == entity_id, # type: ignore[attr-defined] follower_class.following == entity_id
if entity_type == "AUTHOR"
else follower_class.topic == entity_id, # type: ignore[attr-defined]
) )
) )
.first() .first()