Commit 4bd4da57 authored by 段英荣's avatar 段英荣

Merge branch 'vest_debug' into 'master'

add

See merge request alpha/physical!439
parents f5c12622 310c6e8d
......@@ -11,9 +11,12 @@ from django.db import models
def get_edit_tag_id_list(topic_id):
try:
tag_id_list = TopicTag.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=topic_id,
tag_id_list = list(TopicTag.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=topic_id,
is_collection=1).values_list("tag_id",
flat=True)
flat=True))
logging.info("get ---tag_id_list:%s" % tag_id_list)
logging.info("get ---topic_id:%s" % topic_id)
return tag_id_list
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
......@@ -82,9 +85,11 @@ def get_category_tag_id(edit_tag_list):
try:
logging.info("get -----------")
# 拿到搜索的分类
all_category_tag_list = CommunityCategoryTagRelation.objects.filter(tag_id__in=edit_tag_list, is_online=True,
is_deleted=False).values_list(
"category_tag_id", flat=True)
all_category_tag_list = list(
CommunityCategoryTagRelation.objects.filter(tag_id__in=edit_tag_list, is_online=True,
is_deleted=False).values_list(
"category_tag_id", flat=True))
if len(all_category_tag_list) > 0:
index = randint(0, len(all_category_tag_list) - 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