diff options
author | Ana Charpentier <ana.charpentier@free.fr> | 2015-02-10 17:26:41 +0100 |
---|---|---|
committer | Ana Charpentier <ana.charpentier@free.fr> | 2015-02-10 17:26:41 +0100 |
commit | 917511470d77ecb6a755847670f28ce3c2b27209 (patch) | |
tree | 13e439df8c900021940a0294f40abc21c8b5138c | |
parent | 3b4d4b6eb7aaed4a8d2861310cd39bbf479c6718 (diff) | |
download | Ishtar-917511470d77ecb6a755847670f28ce3c2b27209.tar.bz2 Ishtar-917511470d77ecb6a755847670f28ce3c2b27209.zip |
Fix MAIN_AUTHOR on data_importer.py (create when not available)
-rw-r--r-- | archaeological_operations/data_importer.py | 6 |
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 = [ |