Commit 66a98b30 authored by lixiaofang's avatar lixiaofang

update

parent 0272039c
......@@ -109,6 +109,7 @@ class Topic(models.Model):
def get_tag_name_list(self, tag_id_list):
try:
tag_name_list = list()
logging.info("get tag_id_list :%s"%tag_id_list)
if len(tag_id_list) > 100:
lens = int(len(tag_id_list) / 100)
for i in range(lens+1):
......@@ -119,6 +120,8 @@ class Topic(models.Model):
if i * 100 == lens * 100 and len(tag_id_list[lens * 100:]) > 0:
tag_id_100 = tag_id_list[lens * 100:]
if tag_id_100:
logging.info("get tag_id_100 :%s" % tag_id_100)
query_results = Tag.objects.filter(id__in=tag_id_100).values_list("name", flat=True)
for item in query_results:
tag_name_list.append(item)
......
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