Browse Source

fix bug

master
hole-thu 5 years ago
parent
commit
77ea7c3b01
  1. 4
      hole.py

4
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');

Loading…
Cancel
Save