Remove incorrect field from BomItemResource (#6907)

* Remove incorrect field from BomItemResource

- Fixes https://github.com/inventree/InvenTree/issues/6903

* Further fixes

- Better fix for BomItemResource class
This commit is contained in:
Oliver 2024-04-02 14:48:06 +11:00 committed by GitHub
parent d96b36f0b3
commit 2570aff123
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -379,11 +379,11 @@ class BomItemResource(InvenTreeResource):
report_skipped = False
clean_model_instances = True
exclude = ['checksum', 'id', 'part', 'sub_part', 'validated']
exclude = ['checksum', 'part', 'sub_part', 'validated']
level = Field(attribute='level', column_name=_('BOM Level'), readonly=True)
bom_id = Field(
id = Field(
attribute='pk', column_name=_('BOM Item ID'), widget=widgets.IntegerWidget()
)
@ -476,7 +476,6 @@ class BomItemResource(InvenTreeResource):
if is_importing:
to_remove += [
'level',
'pk',
'part',
'part__IPN',
'part__name',