Commit ac3355f8 authored by lixiaofang's avatar lixiaofang

修改数据来源

parent bb7522c0
...@@ -283,9 +283,10 @@ class Topic(models.Model): ...@@ -283,9 +283,10 @@ class Topic(models.Model):
related_billboard_list = list() related_billboard_list = list()
query_results = TopicBillBoard.objects.filter(pictorial_id__in=pictorial_ids) query_results = TopicBillBoard.objects.filter(pictorial_id__in=pictorial_ids, topic_id=self.id)
for items in query_results: for items in query_results:
logging.info("get query_results:%s" % items)
total_vote_cnt = int(items.virt_vote_cnt) + int(items.real_vote_cnt) total_vote_cnt = int(items.virt_vote_cnt) + int(items.real_vote_cnt)
related_billboard_list.append({"pictorial_id": items.pictorial_id, "real_vote_cnt": items.real_vote_cnt, related_billboard_list.append({"pictorial_id": items.pictorial_id, "real_vote_cnt": items.real_vote_cnt,
"virt_vote_cnt": items.virt_vote_cnt, "total_vote_cnt": total_vote_cnt}) "virt_vote_cnt": items.virt_vote_cnt, "total_vote_cnt": total_vote_cnt})
......
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