Fix: Deleted comments show up in the Janitor Volunter system.
This commit is contained in:
parent
fe800dd9a5
commit
f4c6c7cf91
1 changed files with 2 additions and 1 deletions
|
@ -39,9 +39,10 @@ def get_duty(u: User) -> VolunteerDutyJanitor:
|
|||
|
||||
# these could probably be combined into one query somehow
|
||||
|
||||
# find reported comments not made by the current user
|
||||
# find reported not-deleted comments not made by the current user
|
||||
reported_comments = g.db.query(Comment) \
|
||||
.where(Comment.filter_state == 'reported') \
|
||||
.where(Comment.deleted_utc == 0) \
|
||||
.where(Comment.is_approved == None) \
|
||||
.where(Comment.author_id != u.id) \
|
||||
.with_entities(Comment.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue