fix bug
This commit is contained in:
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');
|
||||
|
||||
Reference in New Issue
Block a user