From fbb2a2cc185afa0ce6ca92b9772a0a8b827934b6 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 23 Mar 2026 13:41:37 +0000 Subject: [PATCH] Allow standard fetch/ajax requests in finding and displayset search endpoints --- atlas/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/atlas/views.py b/atlas/views.py index 1161ab24..56a8f561 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -362,8 +362,7 @@ def case_search_partial(request): @login_required def finding_search(request): """HTMX endpoint returning findings, optionally filtered by case and query.""" - if not request.htmx: - return HttpResponse(status=400) + # Allow both HTMX and standard fetch/ajax requests (don't require the HTMX header) q = request.GET.get('q', '').strip() case_id = request.GET.get('case') qs = Finding.objects.all() @@ -383,8 +382,7 @@ def finding_search(request): @login_required def displayset_search(request): """HTMX endpoint returning display sets, scoped to a case if provided.""" - if not request.htmx: - return HttpResponse(status=400) + # Allow both HTMX and standard fetch/ajax requests (don't require the HTMX header) q = request.GET.get('q', '').strip() case_id = request.GET.get('case') qs = CaseDisplaySet.objects.all()