Commit 7e2be98c authored by 李小芳's avatar 李小芳

Merge branch 'add_redis_have_xiaf' into 'master'

add

See merge request !18
parents 41e610b5 93047680
...@@ -109,7 +109,7 @@ def comment(card_info): ...@@ -109,7 +109,7 @@ def comment(card_info):
key = 'have_reply_answer_comment:' + str(card_info['card_id']) key = 'have_reply_answer_comment:' + str(card_info['card_id'])
redis_data = redis_client.hget(key, card_info['current_user_id']) redis_data = redis_client.hget(key, card_info['current_user_id'])
if redis_data: if redis_data:
datas = json.loads(redis_data, encoding="utf-8") datas = json.loads(str(redis_data, encoding="utf-8"))
if card_info['comment_content'] in datas: if card_info['comment_content'] in datas:
logging.info("当前评论和当前的用户已经存在了") logging.info("当前评论和当前的用户已经存在了")
return True return True
......
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