Commit 8fcf5a5c authored by 段英荣's avatar 段英荣

modify

parent 9454e011
......@@ -36,7 +36,7 @@ class Topic(models.Model):
def get_pick_id_info(self):
try:
pick_id_list = list()
query_list = PickTopic.objects.get(topic_id=self.id)
query_list = PickTopic.objects.filter(topic_id=self.id)
for item in query_list:
pick_id_list.append(item.pick_id)
......@@ -49,7 +49,7 @@ class Topic(models.Model):
try:
topic_tag_id_list = list()
query_results = TopicTag.objects.get(topic_id=self.id)
query_results = TopicTag.objects.filter(topic_id=self.id)
for item in query_results:
topic_tag_id_list.append(item.tag_id)
......
......@@ -87,7 +87,7 @@ class User(models.Model):
try:
user_tag_id_list = list()
query_results = AccountUserTag.objects.get(user_id=self.user_id)
query_results = AccountUserTag.objects.filter(user_id=self.user_id)
for item in query_results:
user_tag_id_list.append(item.tag_id)
......
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