Commit f7d26587 authored by 段英荣's avatar 段英荣

modify pictorial sort

parent 35ab8044
...@@ -62,7 +62,7 @@ class Pictorial(models.Model): ...@@ -62,7 +62,7 @@ class Pictorial(models.Model):
def get_topic_id(self): def get_topic_id(self):
try: try:
topic_id_list = PictorialTopics.objects.filter(pictorial_id=self.id,is_online=True,is_deleted=False).values_list("topic_id", flat=True) topic_id_list = list(PictorialTopics.objects.filter(pictorial_id=self.id,is_online=True,is_deleted=False).values_list("topic_id", flat=True))
return topic_id_list return topic_id_list
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
...@@ -108,7 +108,7 @@ class Pictorial(models.Model): ...@@ -108,7 +108,7 @@ class Pictorial(models.Model):
def get_tag_by_id(self): def get_tag_by_id(self):
try: try:
tag_id_list = PictorialTag.objects.filter(pictorial_id=self.id, is_online=True).values_list("tag_id", flat=True) tag_id_list = list(PictorialTag.objects.filter(pictorial_id=self.id, is_online=True).values_list("tag_id", flat=True))
return tag_id_list return tag_id_list
except: except:
...@@ -117,7 +117,7 @@ class Pictorial(models.Model): ...@@ -117,7 +117,7 @@ class Pictorial(models.Model):
def get_tag_by_name(self, tag_id): def get_tag_by_name(self, tag_id):
try: try:
tag_name_list = Tag.objects.filter(id__in=tag_id, is_online=True).values_list("name", flat=True) tag_name_list = list(Tag.objects.filter(id__in=tag_id, is_online=True).values_list("name", flat=True))
return tag_name_list return tag_name_list
except: 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