diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-02-10 16:30:20 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-02-10 16:30:20 +0100 |
commit | 999ae8b097a409d3d89b9849f1018a49547b2ae9 (patch) | |
tree | 22daa785cfca6275d21ede54b5873f8a84ee384b /archaeological_operations | |
parent | 73c8ff7564324a52fa5de45732c6af2fb66cd6b8 (diff) | |
download | Ishtar-999ae8b097a409d3d89b9849f1018a49547b2ae9.tar.bz2 Ishtar-999ae8b097a409d3d89b9849f1018a49547b2ae9.zip |
Fix OPERATOR on data importer (create when not available)
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/data_importer.py | 5 | ||||
-rw-r--r-- | archaeological_operations/forms.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_operations/data_importer.py b/archaeological_operations/data_importer.py index 4c75ba53d..cec4e8104 100644 --- a/archaeological_operations/data_importer.py +++ b/archaeological_operations/data_importer.py @@ -28,6 +28,7 @@ from ishtar_common.models import Town, OrganizationType, SourceType, \ SupportType, Format, AuthorType from archaeological_operations import models +from archaeological_operations.forms import OPERATOR from archaeological_operations.utils import parse_parcels RE_PERMIT_REFERENCE = re.compile('[A-Za-z]*(.*)') @@ -152,8 +153,8 @@ class OperationImporterBibracte(Importer): DESC = u"Exports Bibracte : importeur pour l'onglet opération" DEFAULTS = { ('operator',):{ - 'organization_type':OrganizationType.objects.get( - txt_idx="operator")}, + 'organization_type':OPERATOR + }, } LINE_FORMAT = [ # CODE OPE diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index fa5816bf6..0e7e0ec11 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -193,7 +193,7 @@ SRA_AGENT, created =PersonType.objects.get_or_create(txt_idx='sra_agent') HEAD_SCIENTIST, created = PersonType.objects.get_or_create( txt_idx='head_scientist') -OPERATOR, created = OrganizationType.objects.get_or_create(txt_idx='operator') +OPERATOR, created = OrganizationType.objects.get_or_create(txt_idx='operator') class OperationSelect(TableSelect): year = forms.IntegerField(label=_("Year")) |