Commit 58706d0a authored by 段英荣's avatar 段英荣

modify

parent 8f55a17d
......@@ -34,7 +34,7 @@ class Group(models.Model):
yesterday_end_time = "%s-%s-%s 23:59:59" % (yesterday.year, yesterday.month, yesterday.day)
topic_num = self.group_topics.filter(content_level__in=("4","5"),create_time__gte=yesterday_begin_time,create_time__lte=yesterday_end_time).count()
return topic_num
def detail(self):
......
......@@ -91,16 +91,9 @@ class Topic(models.Model):
user_is_shadow = True
# 是否官方推荐小组
if self.group.is_recommend:
if self.group and self.group.is_recommend:
offline_score += 4.0
"""
group_query_results = Group.objects.filter(id=self.group_id)
if group_query_results.count() > 0:
if group_query_results[0].is_recommend:
offline_score += 4.0
"""
#帖子等级
if self.content_level == '5':
offline_score += 5.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