forked from rDrama/rDrama
1
0
Fork 0

nsfw logic consistency

master
Aevann 2024-02-16 16:50:03 +02:00
parent 01e6942e5c
commit 638f4350be
1 changed files with 3 additions and 1 deletions

View File

@ -236,7 +236,9 @@ def searchcomments(v):
' & '.join(tokens),
postgresql_regconfig='english'))
if 'nsfw' in criteria: comments = comments.filter(Comment.nsfw == True)
if 'nsfw' in criteria:
nsfw = criteria['nsfw'].lower().strip() == 'true'
comments = comments.filter(Comment.nsfw == nsfw)
if 'hole' in criteria:
comments = comments.filter(Post.hole == criteria['hole'])