Skip to content

Commit

Permalink
Merge pull request #8707 from readthedocs/humitos/spam-admin-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos authored Nov 24, 2021
2 parents ecda33f + 4882657 commit df2d62f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions readthedocs/projects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,16 @@ def queryset(self, request, queryset):
if self.value() == self.DENY_ON_ROBOTS:
return queryset.filter(
spam_score__gte=settings.RTD_SPAM_THRESHOLD_DENY_ON_ROBOTS,
spam_score__lt=settings.RTD_SPAM_THRESHOLD_DONT_SERVE_DOCS,
spam_score__lt=settings.RTD_SPAM_THRESHOLD_DONT_SHOW_DASHBOARD,
)
if self.value() == self.DONT_SERVE_DOCS:
return queryset.filter(
spam_score__gte=settings.RTD_SPAM_THRESHOLD_DONT_SERVE_DOCS,
spam_score__lt=settings.RTD_SPAM_THRESHOLD_DONT_SHOW_DASHBOARD,
spam_score__gte=settings.RTD_SPAM_THRESHOLD_DONT_SHOW_DASHBOARD,
spam_score__lt=settings.RTD_SPAM_THRESHOLD_DONT_SERVE_DOCS,
)
if self.value() == self.DONT_SHOW_DASHBOARD:
return queryset.filter(
spam_score__gte=settings.RTD_SPAM_THRESHOLD_DONT_SHOW_DASHBOARD,
spam_score__gte=settings.RTD_SPAM_THRESHOLD_DONT_SERVE_DOCS,
spam_score__lt=settings.RTD_SPAM_THRESHOLD_DELETE_PROJECT,
)
if self.value() == self.DELETE_PROJECT:
Expand Down

0 comments on commit df2d62f

Please sign in to comment.