summaryrefslogtreecommitdiff
path: root/ishtar_common/wizards.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-10-15 20:01:12 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-10-15 20:01:12 +0200
commitfde883430de039e48c06ea692e5421174bd8dea6 (patch)
treecea71e684c74065595873639c2cf36c8f74dc5e5 /ishtar_common/wizards.py
parent11d517940134f0cc8b684bd44c6defebdc5e7745 (diff)
downloadIshtar-fde883430de039e48c06ea692e5421174bd8dea6.tar.bz2
Ishtar-fde883430de039e48c06ea692e5421174bd8dea6.zip
Fix bookmarks fro sites, documents and context records (refs #4781)
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r--ishtar_common/wizards.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 1ad394f25..30aa014c4 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -1494,12 +1494,16 @@ class SearchWizard(IshtarWizard):
bookmark = self.request.GET.get('bookmark', None)
default_search_vector = None
if bookmark and self.model:
+ slug = self.model.SLUG
+ if slug == "site":
+ slug = "archaeologicalsite"
+ app_label = self.model.__module__.split('.')[0]
try:
app_label = self.model.__module__.split('.')[0]
sq = models.SearchQuery.objects.get(
pk=bookmark,
content_type__app_label=app_label,
- content_type__model=self.model.SLUG,
+ content_type__model=slug,
profile__person__ishtaruser__user_ptr=self.request.user
)
default_search_vector = sq.query.replace('"', "''")