summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_operations/models.py3
-rw-r--r--ishtar_common/views.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index b180d333e..fd2559626 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -93,8 +93,7 @@ class ArchaeologicalSite(BaseHistorizedItem):
SLUG = 'site'
BASE_SEARCH_VECTORS = [
"reference", "name", "oceanographic_service_localisation",
- "shipwreck_code", "comment", "shipwreck_name", "discovery_area"
-
+ "shipwreck_code", "comment", "shipwreck_name", "discovery_area",
]
M2M_SEARCH_VECTORS = ["periods__name", "remains__name", "towns__name"]
PARENT_SEARCH_VECTORS = ['operations']
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index 22452ca91..5a35c2509 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -1642,6 +1642,8 @@ class DocumentEditView(DocumentFormMixin, UpdateView):
value = getattr(document, k)
if hasattr(value, 'all'):
value = ",".join([str(v.pk) for v in value.all()])
+ if hasattr(value, 'pk'):
+ value = value.pk
initial[k] = value
kwargs['initial'] = initial