fix distinguish mod logs
parent
2bc1011640
commit
1f48f69814
|
@ -134,6 +134,26 @@ HOLEACTION_TYPES = {
|
|||
"icon": 'fa-eye-evil',
|
||||
"color": 'bg-success'
|
||||
},
|
||||
'distinguish_comment': {
|
||||
"str": 'distinguished {self.target_link}',
|
||||
"icon": 'fa-crown',
|
||||
"color": 'bg-success'
|
||||
},
|
||||
'undistinguish_comment': {
|
||||
"str": 'un-distinguished {self.target_link}',
|
||||
"icon": 'fa-crown',
|
||||
"color": 'bg-muted'
|
||||
},
|
||||
'distinguish_post': {
|
||||
"str": 'distinguished {self.target_link}',
|
||||
"icon": 'fa-crown',
|
||||
"color": 'bg-success'
|
||||
},
|
||||
'undistinguish_post': {
|
||||
"str": 'un-distinguished {self.target_link}',
|
||||
"icon": 'fa-crown',
|
||||
"color": 'bg-muted'
|
||||
},
|
||||
}
|
||||
|
||||
HOLEACTION_TYPES = dict(sorted(HOLEACTION_TYPES.items()))
|
||||
|
|
|
@ -773,7 +773,10 @@ def admin_distinguish_comment(c_id, v):
|
|||
|
||||
g.db.add(comment)
|
||||
|
||||
ma = ModAction(
|
||||
if v.mods_hole(comment.post.hole): cls = HoleAction
|
||||
else: cls = ModAction
|
||||
|
||||
ma = cls(
|
||||
kind=kind,
|
||||
user_id=v.id,
|
||||
target_comment_id=comment.id
|
||||
|
|
|
@ -1207,7 +1207,10 @@ def distinguish_post(post_id, v):
|
|||
|
||||
g.db.add(post)
|
||||
|
||||
ma = ModAction(
|
||||
if v.mods_hole(post.hole): cls = HoleAction
|
||||
else: cls = ModAction
|
||||
|
||||
ma = cls(
|
||||
kind=kind,
|
||||
user_id=v.id,
|
||||
target_post_id=post.id
|
||||
|
|
Loading…
Reference in New Issue