summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-09 19:29:55 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-09 19:29:55 +0100
commita3f984165ae93bdcbace60211c47c92541cc3138 (patch)
tree415090f25c0ad1666da6cd0f6209961e24462d0c /archaeological_operations/models.py
parentca9e0ac1fd7275d686c001d8e63dadb91d1f77b6 (diff)
downloadIshtar-a3f984165ae93bdcbace60211c47c92541cc3138.tar.bz2
Ishtar-a3f984165ae93bdcbace60211c47c92541cc3138.zip
Manage fix of associated items (after imports or database dump)
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 70c1c02ba..cf648a43a 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -38,7 +38,7 @@ from ishtar_common.models import GeneralType, BaseHistorizedItem, \
SourceType, Person, Organization, Town, Dashboard, IshtarUser, ValueGetter,\
DocumentTemplate, ShortMenuItem, DashboardFormItem, GeneralRelationType,\
GeneralRecordRelations, post_delete_record_relation, OperationType, \
- ImageModel, post_save_cache
+ ImageModel, post_save_cache, PersonType
class RemainType(GeneralType):
@@ -252,6 +252,14 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,
"common_name", "comment", "address", "old_code"]
INT_SEARCH_VECTORS = ["year"]
M2M_SEARCH_VECTORS = ["towns__name"]
+ ASSOCIATED = {
+ "scientist": {
+ ('person_types', PersonType): (
+ 'head_scientist',
+ 'sra_agent'
+ )
+ },
+ }
# fields definition
creation_date = models.DateField(_(u"Creation date"),