fix: Remove redundant topic name extraction
This commit is contained in:
parent
d8036fea2f
commit
2686d310a0
1 changed files with 0 additions and 5 deletions
|
@ -97,11 +97,6 @@ def test_subject_mapper(fake_openalex_response):
|
||||||
# Extract topics from the OpenAlex response
|
# Extract topics from the OpenAlex response
|
||||||
topics = fake_openalex_response.get("topics", [])
|
topics = fake_openalex_response.get("topics", [])
|
||||||
|
|
||||||
# Convert topics to strings - we'll use display_name
|
|
||||||
topic_names = []
|
|
||||||
if topics:
|
|
||||||
topic_names = [topic.get("display_name") for topic in topics if topic.get("display_name")]
|
|
||||||
|
|
||||||
# Get subjects using the class method
|
# Get subjects using the class method
|
||||||
subjects = SubjectMapper.get_subjects({"topics": topics})
|
subjects = SubjectMapper.get_subjects({"topics": topics})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue