From 18e19d7920010c6b873ab31f26d515068014bf02 Mon Sep 17 00:00:00 2001 From: eeintech Date: Mon, 28 Sep 2020 16:34:41 -0500 Subject: [PATCH] Empty search query returned all elements from database --- InvenTree/templates/InvenTree/search.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/InvenTree/templates/InvenTree/search.html b/InvenTree/templates/InvenTree/search.html index c030fb42a7..135c9807bc 100644 --- a/InvenTree/templates/InvenTree/search.html +++ b/InvenTree/templates/InvenTree/search.html @@ -18,8 +18,10 @@ InvenTree | {% trans "Search Results" %}


+{% if query %} +
-

{% trans "No results found" %}

+

{% trans "No results found for " %}'{{ query }}'

{% include "InvenTree/search_part_category.html" with collapse_id="categories" %} @@ -34,6 +36,14 @@ InvenTree | {% trans "Search Results" %} {% include "InvenTree/search_stock_items.html" with collapse_id="stock" %} +{% else %} + +
+

{% trans "No results found for " %}'{{ query }}'

+
+ +{% endif %} + {% endblock %} {% block js_load %}