-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent deletion of part which is used in an assembly #7260
Prevent deletion of part which is used in an assembly #7260
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7260 +/- ##
==========================================
- Coverage 84.06% 84.00% -0.07%
==========================================
Files 1054 1054
Lines 46288 46372 +84
Branches 1326 1326
==========================================
+ Hits 38913 38954 +41
- Misses 7043 7086 +43
Partials 332 332
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Sorry that I cannot add some production feedback here, I have not really used assemblies yet. But just from thinking about it, if we delete an part, the part for the assembly is missing, that would mean, we either delete the assembly too, or remove the part from the assembly or deactivate the part somehow that its not shown in search anymore. |
I think that this is not quite right. The change I am implementing here prevents the sub_part from a BOM being deleted - which would in practice mean that a BOM item disappears (without warning) from the BOM of an existing assembly. This change prevents the part from being deleted while it is still in the BOM for a different assembly. |
Adds protection against deleting a part which is a component in an assembly.
@matmair @wolflu05 thoughts here? Should this behaviour be behind a configurable setting?