From 8152db1e35b9a3f35a25f801008f6fc61a6b11c4 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 28 Sep 2015 21:45:15 -0700 Subject: [PATCH] toaster: widgets ToasterTable Add more info to search field exception If we get a search fields exception then also print out the model name Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- lib/toaster/toastergui/widgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/toaster/toastergui/widgets.py b/lib/toaster/toastergui/widgets.py index 7f9637060d6..aaa59c083ed 100644 --- a/lib/toaster/toastergui/widgets.py +++ b/lib/toaster/toastergui/widgets.py @@ -229,7 +229,8 @@ class ToasterTable(TemplateView): """Creates a query based on the model's search_allowed_fields""" if not hasattr(self.queryset.model, 'search_allowed_fields'): - raise Exception("Err Search fields aren't defined in the model") + raise Exception("Search fields aren't defined in the model %s" + % self.queryset.model) search_queries = [] for st in search_term.split(" "): -- 2.47.3