summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAna Charpentier <ana.charpentier@free.fr>2015-02-10 17:26:41 +0100
committerAna Charpentier <ana.charpentier@free.fr>2015-02-10 17:26:41 +0100
commit52293642b0158595db8d5b90feff914566858bf5 (patch)
tree13e439df8c900021940a0294f40abc21c8b5138c
parent8eae3b53e51965d9faa41c867f500a67f74bb48a (diff)
downloadIshtar-52293642b0158595db8d5b90feff914566858bf5.tar.bz2
Ishtar-52293642b0158595db8d5b90feff914566858bf5.zip
Fix MAIN_AUTHOR on data_importer.py (create when not available)
-rw-r--r--archaeological_operations/data_importer.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_operations/data_importer.py b/archaeological_operations/data_importer.py
index cec4e8104..94bbdff7c 100644
--- a/archaeological_operations/data_importer.py
+++ b/archaeological_operations/data_importer.py
@@ -218,12 +218,14 @@ class ParcelImporterBibracte(Importer):
required=False,),
]
+MAIN_AUTHOR, created = AuthorType.objects.get_or_create(txt_idx='main_author')
+
+
class DocImporterBibracte(Importer):
OBJECT_CLS = models.OperationSource
DEFAULTS = {
('authors',):{
- 'author_type':AuthorType.objects.get(
- txt_idx="main_author")},
+ 'author_type':MAIN_AUTHOR},
}
DESC = u"Exports Bibracte : importeur pour l'onglet documentation"
LINE_FORMAT = [