mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
calculate true / false for fields
This commit is contained in:
parent
1556663254
commit
8e6aaa89f9
@ -389,16 +389,16 @@ class PartImport(FileManagementFormView):
|
||||
default_location=optional_matches['default_location'],
|
||||
default_supplier=optional_matches['default_supplier'],
|
||||
variant_of=optional_matches['variant_of'],
|
||||
active=optional_matches['active'],
|
||||
base_cost=optional_matches['base_cost'],
|
||||
multiple=optional_matches['multiple'],
|
||||
assembly=optional_matches['assembly'],
|
||||
component=optional_matches['component'],
|
||||
is_template=optional_matches['is_template'],
|
||||
purchaseable=optional_matches['purchaseable'],
|
||||
salable=optional_matches['salable'],
|
||||
trackable=optional_matches['trackable'],
|
||||
virtual=optional_matches['virtual'],
|
||||
active=str2bool(part_data.get('active', None)),
|
||||
base_cost=part_data.get('base_cost', None),
|
||||
multiple=part_data.get('multiple', None),
|
||||
assembly=str2bool(part_data.get('assembly', None)),
|
||||
component=str2bool(part_data.get('component', None)),
|
||||
is_template=str2bool(part_data.get('is_template', None)),
|
||||
purchaseable=str2bool(part_data.get('purchaseable', None)),
|
||||
salable=str2bool(part_data.get('salable', None)),
|
||||
trackable=str2bool(part_data.get('trackable', None)),
|
||||
virtual=str2bool(part_data.get('virtual', None)),
|
||||
)
|
||||
try:
|
||||
new_part.save()
|
||||
|
Loading…
Reference in New Issue
Block a user