Please verify that this bug has NOT been raised before.
Describe the bug*
PATCH /api/order/po/{id}/ appears to accept status_custom_key, but a valid custom status is not persisted.
Steps to Reproduce
- Confirm custom PO status exists via API:
GET /api/generic/status/custom/?reference_status=PurchaseOrderStatus
[
{
"key": 110,
"name": "NEEDS_APPROVAL",
"label": "Needs Approval",
"logical_key": 10,
"reference_status": "PurchaseOrderStatus"
}
]
- Confirm target PurchaseOrder is has correct logical status.
{
"pk": 282,
"status": 10,
"status_text": "Pending",
"status_custom_key": 10
}
- PATCH with valid custom key for the current logicial status
curl --request PATCH \
--url https://<host>/api/order/po/282/ \
--header 'Authorization: Token <redacted>' \
--header 'Content-Type: application/json' \
--data '{
"status_custom_key": 110
}'
Expected behaviour
status_custom_key should persist.
{
"status": 10,
"status_custom_key": 110
}
Deployment Method
None
Version Information
Inventree version 1.3.2
API version 477
Python 3.14.3
Django 5.2.13
Commit Hash a60e85b
Try to reproduce on the demo site
I tried to reproduce
Is the bug reproducible on the demo site?
Reproducible
Relevant log output
Please verify that this bug has NOT been raised before.
Describe the bug*
PATCH /api/order/po/{id}/appears to acceptstatus_custom_key, but a valid custom status is not persisted.Steps to Reproduce
GET /api/generic/status/custom/?reference_status=PurchaseOrderStatus[ { "key": 110, "name": "NEEDS_APPROVAL", "label": "Needs Approval", "logical_key": 10, "reference_status": "PurchaseOrderStatus" } ]{ "pk": 282, "status": 10, "status_text": "Pending", "status_custom_key": 10 }Expected behaviour
status_custom_keyshould persist.{ "status": 10, "status_custom_key": 110 }Deployment Method
None
Version Information
Inventree version 1.3.2
API version 477
Python 3.14.3
Django 5.2.13
Commit Hash a60e85b
Try to reproduce on the demo site
I tried to reproduce
Is the bug reproducible on the demo site?
Reproducible
Relevant log output