Skip to content

Commit

Permalink
[Version 1.40.8] Fix bug importer trailing space column name
Browse files Browse the repository at this point in the history
  • Loading branch information
meomancer committed Apr 29, 2024
1 parent 2405667 commit 184ab55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion django_project/geosight/importer/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions django_project/geosight/importer/importers/excel/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion django_project/version/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.40.7
1.40.8

0 comments on commit 184ab55

Please sign in to comment.