diff --git a/backend/apps/owasp/api/search/issue.py b/backend/apps/owasp/api/search/issue.py index 91904152..0eeef846 100644 --- a/backend/apps/owasp/api/search/issue.py +++ b/backend/apps/owasp/api/search/issue.py @@ -44,7 +44,7 @@ def project_issues(request): issues = cache.get(cache_key) if issues is None: - issues = get_issues(query, distinct=query != "") + issues = get_issues(query, distinct=not query) cache.set(cache_key, issues, DAY_IN_SECONDS) return JsonResponse( diff --git a/backend/apps/slack/commands/contribute.py b/backend/apps/slack/commands/contribute.py index 4f726fbe..b790d7ba 100644 --- a/backend/apps/slack/commands/contribute.py +++ b/backend/apps/slack/commands/contribute.py @@ -35,7 +35,9 @@ def handler(ack, command, client): "idx_title", "idx_url", ] - if issues := get_issues(search_query, attributes=attributes, limit=10): + if issues := get_issues( + search_query, attributes=attributes, distinct=not search_query, limit=10 + ): blocks = [ markdown( (