Fixed the search query to only match the whole account code in the accounting application.

This commit is contained in:
依瑪貓 2020-09-03 20:52:32 +08:00
parent 9c5b0d59c4
commit b79963611a

View File

@ -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: