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

modify

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