From ffe66839b0518c10ccebfbb03ebba3c37fb56e94 Mon Sep 17 00:00:00 2001 From: Andrey S Date: Wed, 23 Sep 2020 19:30:31 +0300 Subject: [PATCH] CS-5875: fix import into a project --- .../apps/document/migration/document_import.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contraxsuite_services/apps/document/migration/document_import.py b/contraxsuite_services/apps/document/migration/document_import.py index 235cba3a..3e81b9e3 100644 --- a/contraxsuite_services/apps/document/migration/document_import.py +++ b/contraxsuite_services/apps/document/migration/document_import.py @@ -208,6 +208,10 @@ def import_projects(self): if proj_type in self.missing_doc_types: raise Exception(f'Doc. type {self.missing_doc_types[proj_type]} ' + f'was not found, project "{proj_name}"') + if self.project: + self.project_ids[proj_id] = self.project.pk + continue + proj_type = self.document_types[proj_type] # TRANSACTION starts here with transaction.atomic():