digest: Check whether length of hot topics is 4.

The length of hot topics would not exceed 4.
This commit is contained in:
Vishnu KS
2021-02-05 00:29:15 +05:30
committed by Tim Abbott
parent 5c026d67e3
commit c0bd05b52d

View File

@@ -195,7 +195,7 @@ def get_hot_topics(
for topic in topics_by_length:
if topic not in hot_topics:
hot_topics.append(topic)
if len(hot_topics) >= 4:
if len(hot_topics) == 4:
break
return hot_topics