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

modify

parent c6686a11
......@@ -155,7 +155,7 @@ def choice_push_tag(device_id, user_id):
@bind("physical/search/identity_tag_name")
def identity_tag_name(topic_content):
try:
ret_tag_list = list()
ret_tag_set = set()
redis_key_name = "physical:tag_name_set"
body = {
......@@ -171,9 +171,9 @@ def identity_tag_name(topic_content):
token_word = item["token"]
is_member = redis_client.sismember(redis_key_name, token_word)
if is_member:
ret_tag_list.append(token_word)
ret_tag_set.add(token_word)
return {"tag_name_list": ret_tag_list}
return {"tag_name_list": list(ret_tag_set)}
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return {"tag_name_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