Commit 1159c241 authored by lixiaofang's avatar lixiaofang

add

parent 4f420ce0
......@@ -198,6 +198,16 @@ class Topic(models.Model):
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return ([], [])
def get_edit_tag_id_list(self):
try:
tag_id_list = TopicTag.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id,
is_collection=1).values_list("tag_id",
flat=True)
return tag_id_list
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return []
def get_topic_useful_tag_id_list(self):
try:
topic_useful_tag_id_list = list()
......
......@@ -53,7 +53,7 @@ class TopicTransfer(object):
begin = time.time()
(topic_tag_id_list, edit_tag_id_list) = instance.get_topic_tag_id_list()
res["tag_list"] = topic_tag_id_list
res["edit_tag_list"] = edit_tag_id_list
res["edit_tag_list"] = instance.get_edit_tag_id_list()
end = time.time()
time1 = (end - begin)
......
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