This commit is contained in:
@@ -27,7 +27,8 @@ def get_entity_field_name(entity_type: str) -> str:
|
||||
"""Возвращает имя поля для связи с сущностью в модели подписчика"""
|
||||
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}")
|
||||
msg = f"Unknown entity_type: {entity_type}"
|
||||
raise ValueError(msg)
|
||||
return entity_field_mapping[entity_type]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user