diff --git a/hole.py b/hole.py index d707f0e..3ad48ed 100644 --- a/hole.py +++ b/hole.py @@ -196,7 +196,7 @@ def get_comment(): return { 'code': 0, - 'attention': check_attention(hash_name(u.name), pid), + 'attention': check_attention(u.name, pid), 'data': data } @@ -248,6 +248,8 @@ def attention(): at = Attention(name_hash=hash_name(u.name), pid=pid, disabled=True) db.session.add(at) + print(at.disabled, s=='0') + if(at.disabled != (s == '0')): at.disabled = (s == '0') post.likenum += 1 - 2 * int(s == '0');