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

Merge branch 'topic_detail_page_recommend_clean' into 'master'

list transform

See merge request alpha/physical!437
parents 54048949 c33b3ed2
...@@ -60,7 +60,7 @@ class CollectData(object): ...@@ -60,7 +60,7 @@ class CollectData(object):
try: try:
redis_linucb_tag_data_dict = self._get_user_linucb_info(device_id) redis_linucb_tag_data_dict = self._get_user_linucb_info(device_id)
if len(redis_linucb_tag_data_dict) == 0: if len(redis_linucb_tag_data_dict) == 0:
recommend_tag_list = LinUCB.get_default_tag_list(user_id) recommend_tag_list = list(LinUCB.get_default_tag_list(user_id))
LinUCB.init_device_id_linucb_info(redis_client, self.linucb_matrix_redis_prefix,device_id,recommend_tag_list) LinUCB.init_device_id_linucb_info(redis_client, self.linucb_matrix_redis_prefix,device_id,recommend_tag_list)
else: else:
user_feature = user_feature if user_feature else self.user_feature user_feature = user_feature if user_feature else self.user_feature
...@@ -292,9 +292,9 @@ class CollectData(object): ...@@ -292,9 +292,9 @@ class CollectData(object):
# if len(exposure_sql_query_results)>0: # if len(exposure_sql_query_results)>0:
if len(tagid_list) > 0: if len(tagid_list) > 0:
tag_query_results = Tag.objects.using(settings.SLAVE_DB_NAME).filter( tag_query_results = list(Tag.objects.using(settings.SLAVE_DB_NAME).filter(
id__in=tagid_list, is_online=True, is_deleted=False, id__in=tagid_list, is_online=True, is_deleted=False,
is_category=False).values_list("id",flat =True) is_category=False).values_list("id",flat =True))
is_click = 1 is_click = 1
is_vote = 0 is_vote = 0
......
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