mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-18 14:07:41 +00:00
[bug] API row locking (#13274)
* row locking on patch * row-level locking on action endpoints * apply row locking to barcode actions * additional row-locking for build actions * rename exception class * updated docs * Add specific error code * Fix translated text * Handle AttributeError
This commit is contained in:
1 parent
3572714f5f
commit
b2a9218cfb
16 files changed
+1125
-41
No files matched your search
@@ -763,6 +763,15 @@ export function ApiForm({
|
||||
invalidResponse(error.response.status);
|
||||
props.onFormError?.(error, form);
|
||||
break;
|
||||
case 409:
|
||||
// The item is locked by another process (e.g. a background task),
|
||||
// and the request was not applied - the user can retry
|
||||
setNonFieldErrors([
|
||||
error.response.data?.detail ??
|
||||
t`This item is being updated by another process. Please try again.`
|
||||
]);
|
||||
props.onFormError?.(error, form);
|
||||
break;
|
||||
default:
|
||||
// Unexpected state on form error
|
||||
invalidResponse(error.response.status);
|
||||
|
||||
Reference in new issue
Block a user