fmt
Some checks failed
Deploy on push / deploy (push) Failing after 6s

This commit is contained in:
2025-08-30 17:05:58 +03:00
parent ecae526d1b
commit 1ad4b9118e

View File

@@ -25,12 +25,9 @@ from utils.logger import root_logger as logger
def get_entity_field_name(entity_type: str) -> str:
"""Возвращает имя поля для связи с сущностью в модели подписчика"""
entity_field_mapping = {
"author": "following",
"topic": "topic",
"community": "community",
"shout": "shout"
}
entity_field_mapping = {"author": "following", "topic": "topic", "community": "community", "shout": "shout"}
if entity_type not in entity_field_mapping:
raise ValueError(f"Unknown entity_type: {entity_type}")
return entity_field_mapping[entity_type]
@@ -100,6 +97,7 @@ async def follow(
if entity_id is not None and isinstance(entity_id, int):
entity_field = get_entity_field_name(entity_type)
logger.debug(f"entity_type: {entity_type}, entity_field: {entity_field}")
existing_sub = (
session.query(follower_class)