Commit 121b7530 authored by 段英荣's avatar 段英荣

modify

parent cc145eae
......@@ -9,7 +9,8 @@ from libs.es import ESPerform
from django.db import models
import datetime
from .topic import Topic
# duan add,need modify
#from .topic import Topic
class Group(models.Model):
class Meta:
......@@ -34,7 +35,8 @@ class Group(models.Model):
yesterday_begin_time = "%s-%s-%s 00:00:00" % (yesterday.year, yesterday.month, yesterday.day)
yesterday_end_time = "%s-%s-%s 23:59:59" % (yesterday.year, yesterday.month, yesterday.day)
return Topic.objects.filter(content_level__in=("4", "5"), group_id=self.id,create_time__gte=yesterday_begin_time,create_time__lte=yesterday_end_time).count()
return 0
#return Topic.objects.filter(content_level__in=("4", "5"), group_id=self.id,create_time__gte=yesterday_begin_time,create_time__lte=yesterday_end_time).count()
def detail(self):
result = {
......
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