Commit 93c0933e authored by lixiaofang's avatar lixiaofang

add

parent b535be91
...@@ -216,3 +216,5 @@ class CommunityPictorialActivityRelation(models.Model): ...@@ -216,3 +216,5 @@ class CommunityPictorialActivityRelation(models.Model):
is_deleted = models.BooleanField(verbose_name=u'是否被删除', max_length=1) is_deleted = models.BooleanField(verbose_name=u'是否被删除', max_length=1)
pictorial_activity_id = models.BigIntegerField(verbose_name=u'活动ID', max_length=20) pictorial_activity_id = models.BigIntegerField(verbose_name=u'活动ID', max_length=20)
pictorial_id = models.BigIntegerField(verbose_name=u'榜单ID', max_length=20) pictorial_id = models.BigIntegerField(verbose_name=u'榜单ID', max_length=20)
...@@ -80,7 +80,7 @@ def get_pictorial_tag_by_id(pictorial_id): ...@@ -80,7 +80,7 @@ def get_pictorial_tag_by_id(pictorial_id):
def get_edit_comment(): def get_edit_comment():
try: try:
last = Topic.objects.count() - 1 last = CommunityPictorialActivityRelation.objects.count() - 1
index1 = randint(0, last) index1 = randint(0, last)
index_data = Topic.objects.all()[index1] index_data = Topic.objects.all()[index1]
return index_data.type_id return index_data.type_id
...@@ -88,3 +88,5 @@ def get_edit_comment(): ...@@ -88,3 +88,5 @@ def get_edit_comment():
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return -1 return -1
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