master
Aevann1 2021-11-30 16:48:55 +02:00
parent 3d7b4214cf
commit 1657464395
1 changed files with 2 additions and 4 deletions

View File

@ -101,8 +101,7 @@ def api_vote_post(post_id, new, v):
post.author.coins += 1
post.author.truecoins += 1
g.db.add(post.author)
real = v.profileurl or v.namecolor != defaultcolor or v.customtitle
if real == None: real = False
real = bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor
vote = Vote(user_id=v.id,
vote_type=new,
submission_id=post_id,
@ -170,8 +169,7 @@ def api_vote_comment(comment_id, new, v):
comment.author.coins += 1
comment.author.truecoins += 1
g.db.add(comment.author)
real = v.profileurl or v.namecolor != defaultcolor or v.customtitle
if real == None: real = False
real = bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor
vote = CommentVote(user_id=v.id,
vote_type=new,
comment_id=comment_id,