From f88edd03db806b846ad10c68279a1a7c4902f3ee Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 22 Aug 2018 16:59:00 +0200 Subject: Bookmark: manage missing bookmark configuration --- ishtar_common/wizards.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ishtar_common/wizards.py') diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 9a068063b..62bafdfe4 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1424,7 +1424,7 @@ class SearchWizard(IshtarWizard): current_step = self.steps.current bookmark = self.request.GET.get('bookmark', None) default_search_vector = None - if bookmark: + if bookmark and self.model: try: app_label = self.model.__module__.split('.')[0] sq = models.SearchQuery.objects.get( @@ -1444,6 +1444,18 @@ class SearchWizard(IshtarWizard): return context +class PersonSearch(SearchWizard): + model = models.Person + + +class OrganizationSearch(SearchWizard): + model = models.Organization + + +class DocumentSearch(SearchWizard): + model = models.Document + + class DeletionWizard(Wizard): def __init__(self, *args, **kwargs): if (not hasattr(self, 'fields') or not self.fields) and \ -- cgit v1.2.3