Skip to content
Snippets Groups Projects
Commit ce50a83a authored by Jan Bernoth's avatar Jan Bernoth
Browse files

Merge branch '178-performance-hot-topics' into 'master'

Resolve "Performance HotTopics(APIView)"

Closes #178

See merge request !264
parents f5ac84c3 801f0989
No related branches found
No related tags found
1 merge request!264Resolve "Performance HotTopics(APIView)"
Pipeline #67296 passed with warnings
...@@ -840,9 +840,9 @@ def get_tag_count(tag_count, tags_dict, tag, att): ...@@ -840,9 +840,9 @@ def get_tag_count(tag_count, tags_dict, tag, att):
:param tag: specific Tag object for which the article count should be retrieved :param tag: specific Tag object for which the article count should be retrieved
:param att: name of the tag_count attribute which should be updated :param att: name of the tag_count attribute which should be updated
""" """
filtered_week_days = list(filter(lambda t: t.name == tag.name, tags_dict.all())) # search for tag.name in list tag_in_list = tags_dict.filter(id=tag.id)
if len(filtered_week_days) > 0: if len(tag_in_list) > 0:
tag_count[att] = filtered_week_days[0].article_count tag_count[att] = tag_in_list[0].article_count
def get_filtered_tags(interval_date_start, interval_date_end): def get_filtered_tags(interval_date_start, interval_date_end):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment