2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-14 06:31:27 +00:00
Files
InvenTree/src/backend
Oliver 22218fd5c6 [bug] Tree fix (#9979)
* Refactor InvenTreeTree model structure

- Allow for tree with null items

* Refactor pathstring

* Factor pathstring out into a separate mixin

- Keep tree operations separate (in InvenTreeTree)
- Pathstring operations are now in PathStringMixin

* throw error

- Ensure that this func gets removed in future commit

* Fix node delete code

* Migrate "Build" model to new structure

* Add unit tests for Build tree structure

* Refactor StockLocationTreeTest

* Implement tree rebuild test for StockItem model

* Add unit test for stock item serialization

* Refactor "Part" model to use mixin

* Add unit tests for part variant tree

* Add test for node deletion

* Adjust unit tests

* Ensure items are not created with null tree_id

* Further unit tests and updates

* Fix unit tests

* Remove duplicate check

* Adjust build fixture

* Remove rebuild call

* Fixing more tests

* Remove calls to rebuild part tree

* Add test for tree fixtures

* Report tree rebuild errors to sentry

* Remove helper func

* Updates for splitStock

* Cleaner inheritance

* Simpilfy test

- tree_id is somewhat ephemeral

* Handle null parent

* Enforce partial rebuild if parent changes

* Fix

* Remove hard-coded "parent" references

* Fix order of delete operations

* Fix unit test

* Unit test tweaks

* Improved handling for deleting a root node

* Only set tree_id if not already specified

* Only rebuild valid tree_id values

* Cast to list

* Adjust unit test

- Test values were wrong, due to bad data in fixtures

* Do not bulk delete

- mysql no likey

* Enhanced rebuild logic

* Fix for unit test

* Improve logic for _create_serial_numbers

* Unit test fix

* Remove unused function
2025-07-13 21:27:32 +10:00
..
2025-07-13 21:27:32 +10:00
2025-01-05 12:57:20 +11:00
2025-07-11 08:44:33 +10:00