Commit 7179be06 authored by 段英荣's avatar 段英荣

modify register_user_tag

parent c5a99071
......@@ -39,10 +39,8 @@ class RegisterUserTag(object):
for item in query_results:
tag_id = item.tag_id
user_id = item.user
if user_id not in user_id_dict:
user_id_dict[user_id] = set()
user_id_dict[user_id].add(tag_id)
user_tag_list = AccountUserTag.objects.filter(user=user_id).values_list("tag_id", flat=True)
user_id_dict[user_id] = user_tag_list
for user_id in user_id_dict:
redis_client.hset(cls.linucb_register_user_tag_key, user_id, json.dumps(list(user_id_dict[user_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