2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-27 19:16:44 +00:00

Tweak for data import (#9010) (#9322)

- Do not override specified default values
This commit is contained in:
Oliver 2025-03-17 23:11:31 +11:00 committed by GitHub
parent 92f6f8b1f7
commit 0491b10438
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -166,7 +166,8 @@ class DataImportSession(models.Model):
continue
# Extract a "default" value for the field, if one exists
if 'default' in field_def:
# Skip if one has already been provided by the user
if field not in self.field_defaults and 'default' in field_def:
self.field_defaults[field] = field_def['default']
# Generate a list of possible column names for this field