Repository navigation
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #12955 +/- ##
==========================================
+ Coverage 87.15% 87.29% +0.13%
==========================================
Files 1522 1522
Lines 105631 105565 -66
Branches 11768 11890 +122
==========================================
+ Hits 92062 92151 +89
+ Misses 13502 13347 -155
Partials 67 67
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| 'cancel_build': { | ||
| 'name': 'cancel', | ||
| 'return_code': 201, | ||
| 'serializer_class': build.serializers.BuildCancelSerializer, |
There was a problem hiding this comment.
AI:
Passing
BuildCancelSerializerhere also makes the transition handler use it to serialize the Build instance for the response. Since Build has noremove_allocated_stockattribute, a successful request withremove_allocated_stock=truenow returnsfalse(the field default). Previously the response reflected the validated input. The same issue affectsBuildCompleteSerializerbelow.
If I understand it correctly, current transition_action expects model serializer (or serializer with only model as input), not Action-options serializer.
InvenTree/src/backend/InvenTree/generic/states/api_helpers.py
Lines 163 to 167 in b095513
Purchase-order completion already has the same problem, with some transitions returning the serialized model(cancel_order , hold_order, place_order) and completion returning {"accept_incomplete": false}
There was a problem hiding this comment.
Yes that replicates old API behaviour; see the TODOs for a breaking change
There was a problem hiding this comment.
Problem is that old API returned validated input ({remove_allocated_stock: true}; now it returns defaults {remove_allocated_stock: false} for identical call
|
@matmair it would be great to get this one closed out soon, we are close to being able to release |
|
This has the risk of breaking things; I have moved it to 1.7.0 |
Merging this PR will degrade performance by 12.55%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
similar to #12317, follow up to #12693