Commit e700a4e7 authored by lixiaofang's avatar lixiaofang

榜单所对应帖子

parent 08254bef
......@@ -272,9 +272,12 @@ class Topic(models.Model):
def get_related_billboard(self):
try:
pictorial_ids = Topic.get_pictorial_id()
related_billboard_list = list()
query_results = TopicBillBoard.objects.filter(topic_id=self.id)
query_results = TopicBillBoard.objects.filter(pictorial_id__in=pictorial_ids)
for items in query_results:
total_vote_cnt = int(items.virt_vote_cnt) + int(items.real_vote_cnt)
......@@ -290,8 +293,6 @@ class Topic(models.Model):
return []
class TopicComplaint(models.Model):
"""帖子举报"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment