Commit 46827cd1 authored by lixiaofang's avatar lixiaofang

add

parent 2b7cc327
...@@ -85,7 +85,7 @@ class Topic(models.Model): ...@@ -85,7 +85,7 @@ class Topic(models.Model):
def get_virtual_vote_num(self): def get_virtual_vote_num(self):
try: try:
topic_extra = TopicExtra.object.get(topic_id=self.id) topic_extra = TopicExtra.objects.filter(topic_id=self.id)
return topic_extra.virtual_vote_num return topic_extra.virtual_vote_num
except: except:
return 0 return 0
......
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