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

modify bug

parent 650e4485
......@@ -125,7 +125,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
is_online=1).values_list("topic_id")
if len(promote_recommend_topic_id_list)>0:
for topic_id in promote_recommend_topic_id_list:
have_read_topic_id_list_add_promote.extend(topic_id)
have_read_topic_id_list_add_promote.append(topic_id)
topic_id_list = list()
rank_topic_id_list = TopicUtils.get_recommend_topic_ids(user_id=user_id, tag_id=tag_id, offset=offset, size=size,
......@@ -137,14 +137,14 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
if (len(recommend_topic_list) == 6):
if (size < 11):
topic_id_list.extend(rank_topic_id_list[0:3])
topic_id_list.extend(recommend_topic_id_list[0:3])
topic_id_list.extend(recommend_topic_list[0:3])
topic_id_list.extend(rank_topic_id_list[3:size])
topic_id_list.extend(recommend_topic_id_list[3:6])
topic_id_list.extend(recommend_topic_list[3:6])
else:
topic_id_list.extend(rank_topic_id_list[0:size - 7])
topic_id_list.extend(recommend_topic_id_list[0:3])
topic_id_list.extend(recommend_topic_list[0:3])
topic_id_list.extend(rank_topic_id_list[size - 7:size])
topic_id_list.extend(recommend_topic_id_list[3:6])
topic_id_list.extend(recommend_topic_list[3:6])
else:
topic_id_list.extend(rank_topic_id_list)
......
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