From b79963611aa2a0f90fe69a7a93755aaf14594dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Thu, 3 Sep 2020 20:52:32 +0800 Subject: [PATCH] Fixed the search query to only match the whole account code in the accounting application. --- accounting/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounting/views.py b/accounting/views.py index 9a73725..4105a8d 100644 --- a/accounting/views.py +++ b/accounting/views.py @@ -772,7 +772,7 @@ def search(request: HttpRequest) -> HttpResponse: Q(account__in=Account.objects.filter( Q(title_l10n__icontains=query) | Q(l10n_set__value__icontains=query) - | Q(code__icontains=query))) + | Q(code=query))) | Q(summary__icontains=query) | Q(transaction__notes__icontains=query)) try: