skip k6 api batch update when batch create fails (#38282)

This commit is contained in:
nigeljamesstevenson 2023-05-15 11:16:11 +01:00 committed by GitHub
commit c190f971b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
skip k6 batch update when batch create fails

View File

@ -186,6 +186,10 @@ export function ordersAPI() {
group( 'API Batch Update Orders', function () {
let updateBatchItem;
if ( ! post_ids ) {
return;
}
for ( let index = 0; index < batchSize; index++ ) {
updateBatchItem = {
id: `${ post_ids[ index ] }`,