Commit 68d9f160 authored by 王浩's avatar 王浩

fix topic batch create

parent 5a78d69f
......@@ -23,9 +23,13 @@ class CreateTopicForBatch(BaseView):
# 敏感词检测,获取可用的帖子
check_info = Sensitive.check([topic["content"] for topic in topic_list if topic.get("content")])
for topic in topic_list:
succ = check_info.get(topic.get("content")) if topic.get("content") else True
if not succ:
topics.append(topic)
if topic.get('content'):
succ = check_info.get(topic.get("content"))
if not succ:
topics.append(topic)
else:
if topic.get('images') or topic.get('video'):
topics.append(topic)
if not topics:
return self.ok()
......
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