Commit 27be356a authored by Kai's avatar Kai

update

parent 96e96568
......@@ -194,12 +194,8 @@ class Topic(models.Model):
def get_topic_useful_tag_id_list(self):
try:
topic_useful_tag_id_list = list()
tag_id_list = TopicTag.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id).values_list("tag_id","is_online","is_body_esthetics",flat=True)
tag_id_list = TopicTag.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id,is_online =True,is_body_esthetics = 1)
for tag_item in tag_id_list:
is_online=tag_item.is_online
is_body_esthetics=tag_item.is_body_esthetics
if is_online and is_body_esthetics != 0:
topic_useful_tag_id_list.append(tag_item.tag_id)
return topic_useful_tag_id_list
except:
......
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