Skip to content

Commit

Permalink
Update disctinct issues logic
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Nov 7, 2024
1 parent c6ae046 commit 92b4fa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/apps/owasp/api/search/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion backend/apps/slack/commands/contribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
(
Expand Down

0 comments on commit 92b4fa8

Please sign in to comment.