diff --git a/django_project/geosight/importer/admin.py b/django_project/geosight/importer/admin.py index 6d9fb7f7d..d1088e13e 100644 --- a/django_project/geosight/importer/admin.py +++ b/django_project/geosight/importer/admin.py @@ -26,7 +26,7 @@ def import_data(modeladmin, request, queryset): """Run importers.""" for importer in queryset: - run_importer.delay(importer.id) + run_importer(importer.id) import_data.short_description = 'Run import data' diff --git a/django_project/geosight/importer/importers/excel/_base.py b/django_project/geosight/importer/importers/excel/_base.py index ddda250f0..106afa16d 100644 --- a/django_project/geosight/importer/importers/excel/_base.py +++ b/django_project/geosight/importer/importers/excel/_base.py @@ -104,12 +104,12 @@ def get_records(self) -> List: row = {} for idx, header in enumerate(headers): try: - row[header] = clean_value(record[idx]) + row[header.strip()] = clean_value(record[idx]) except (ValueError, IndexError): pass for key, value in self.mapping.items(): try: - row[value] = clean_value(row[key]) + row[value] = clean_value(row[key.strip()]) except KeyError: pass data.append(row) diff --git a/django_project/version/version.txt b/django_project/version/version.txt index 5679b37ea..8e243e11d 100644 --- a/django_project/version/version.txt +++ b/django_project/version/version.txt @@ -1 +1 @@ -1.40.7 \ No newline at end of file +1.40.8 \ No newline at end of file