diff --git a/ucs-school-import/modules/ucsschool/http_api/import_api/tasks.py b/ucs-school-import/modules/ucsschool/http_api/import_api/tasks.py index 4d519000d..3f88d65c3 100644 --- a/ucs-school-import/modules/ucsschool/http_api/import_api/tasks.py +++ b/ucs-school-import/modules/ucsschool/http_api/import_api/tasks.py @@ -92,6 +92,8 @@ def run_import_job(task, importjob_id): runner.prepare_import() except Exception as exc: logger.exception('An error occurred while preparing the import job: {}'.format(exc)) + if runner.logger: + runner.logger.exception('An error occurred while preparing the import job: {}'.format(exc)) else: # from here on we can log with the import logger runner.logger.info('-- Starting import job... --')