Commit 182baaa0 authored by 李小芳's avatar 李小芳

grey

parent 6ad04c42
...@@ -218,7 +218,8 @@ def get_tractate(pks): ...@@ -218,7 +218,8 @@ def get_tractate(pks):
+ item['channel_tags_names'] + item['anecdote_tags'] + item["first_classify_names"] + item[ + item['channel_tags_names'] + item['anecdote_tags'] + item["first_classify_names"] + item[
"second_classify_names"] + operators_add_tags_names) "second_classify_names"] + operators_add_tags_names)
tags_inter = list(set(tractate_all_tag_names).intersection(set(filter_tags_names))) tags_inter = [item for item in list(set(tractate_all_tag_names)) if item in list(set(filter_tags_names))]
# tags_inter = list(set(tractate_all_tag_names).intersection(set(filter_tags_names)))
if tags_inter: if tags_inter:
item['show_by_index'] = 2 # 2 标签中含有过滤列表中的标签 item['show_by_index'] = 2 # 2 标签中含有过滤列表中的标签
else: else:
...@@ -266,6 +267,7 @@ def get_tractate(pks): ...@@ -266,6 +267,7 @@ def get_tractate(pks):
else: else:
item['selected_content_type'] = -1 item['selected_content_type'] = -1
else: else:
try:
result_data = alo_model.run(tractate.content) result_data = alo_model.run(tractate.content)
item['selected_content_type'] = int(result_data.get("content_type", 0)) item['selected_content_type'] = int(result_data.get("content_type", 0))
item['selected_internet_celebrity'] = [list(item.keys())[0] for item in item['selected_internet_celebrity'] = [list(item.keys())[0] for item in
...@@ -273,6 +275,8 @@ def get_tractate(pks): ...@@ -273,6 +275,8 @@ def get_tractate(pks):
item['selected_stars'] = [list(item.keys())[0] for item in result_data.get("star", [])] item['selected_stars'] = [list(item.keys())[0] for item in result_data.get("star", [])]
projects = [list(item.keys())[0] for item in result_data.get("projects", [])] projects = [list(item.keys())[0] for item in result_data.get("projects", [])]
item['portrait_tag_name'].extend(projects) item['portrait_tag_name'].extend(projects)
except:
pass
if "operators_add_tags" in item and 3315 in item['operators_add_tags']: if "operators_add_tags" in item and 3315 in item['operators_add_tags']:
item['new_smr'] = tractate.get_tractate_newuser_smr(tractate_id=tractate.id) item['new_smr'] = tractate.get_tractate_newuser_smr(tractate_id=tractate.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