2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Update data migration (#7455)

- Handle case with missing data
This commit is contained in:
Oliver 2024-06-17 08:16:56 +10:00 committed by GitHub
parent 946390a4a3
commit db7632ecb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,7 @@ def convert_legacy_labels(table_name, model_name, template_model):
} }
for field in non_null_fields: for field in non_null_fields:
if data[field] is None: if data.get(field, None) is None:
data[field] = '' data[field] = ''
# Skip any "builtin" labels # Skip any "builtin" labels