summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index a37c1f6bc..b03604e26 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -3831,12 +3831,12 @@ class Document(BaseHistorizedItem, OwnPerms, ImageModel):
# other will be symbolic links
RELATED_MODELS = [
'treatment_files', 'treatments', 'finds', 'context_records',
- 'operations', 'sites', 'warehouses', 'files'
+ 'operations', 'sites', 'warehouses', 'containers', 'files'
]
# same fields but in order for forms
RELATED_MODELS_ALT = [
'finds', 'context_records', 'operations', 'sites', 'files',
- 'warehouses', 'treatments', 'treatment_files',
+ 'warehouses', 'containers', 'treatments', 'treatment_files',
]
SLUG = 'document'
LINK_SPLIT = u"<||>"
@@ -3926,6 +3926,10 @@ class Document(BaseHistorizedItem, OwnPerms, ImageModel):
pgettext_lazy("key for text search", u"file"),
'files__cached_label__iexact'
),
+ 'container': SearchAltName(
+ pgettext_lazy("key for text search", u"container"),
+ 'containers__cached_label__iexact'
+ ),
'site': SearchAltName(
pgettext_lazy("key for text search", u"site"),
'sites__cached_label__iexact'
@@ -3937,11 +3941,6 @@ class Document(BaseHistorizedItem, OwnPerms, ImageModel):
}
objects = ExternalIdManager()
-
- RELATED_MODELS_ALT = [
- 'finds', 'context_records', 'operations', 'sites', 'files',
- 'warehouses', 'treatments', 'treatment_files',
- ]
RELATIVE_SESSION_NAMES = [
('find', 'finds__pk'),
('contextrecord', 'context_records__pk'),