Update BomItem 'validated' field (#4486)

* Adds new "validated" field to the BomItem model

- Previously this was dynamically calculated (very expensive)
- Now cached and updated whenever a BomItem instance is saved
- Will make the BOM API much more responsive
- Cleanup BomItem list API code also

* Adds data migration to update existing BomItem objects

* Exclude 'validated' field from BomItemResource class
This commit is contained in:
Oliver authored and GitHub committed 2023-03-14 13:53:33 +11:00
1 parent 06f8a50956
commit 1ba51e51c3
6 files changed
+84 -34

No files matched your search

+1
View File
@@ -259,6 +259,7 @@ class BomItemResource(InvenTreeResource):
'id',
'part',
'sub_part',
'validated',
]
level = Field(attribute='level', column_name=_('BOM Level'), readonly=True)