mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-18 16:31:31 +00:00
Fix how bulk delete operation gets called when no partition key
This commit is contained in:
@@ -813,7 +813,11 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
|||||||
_collection,
|
_collection,
|
||||||
toDeleteDocumentIds.map((id) => ({
|
toDeleteDocumentIds.map((id) => ({
|
||||||
id: id.id(),
|
id: id.id(),
|
||||||
partitionKey: id.partitionKeyValue,
|
// bulk delete: if not partition key is specified, do not pass empty array, but undefined
|
||||||
|
partitionKey:
|
||||||
|
id.partitionKeyValue && Array.isArray(id.partitionKeyValue) && id.partitionKeyValue.length === 0
|
||||||
|
? undefined
|
||||||
|
: id.partitionKeyValue,
|
||||||
})),
|
})),
|
||||||
)
|
)
|
||||||
.then(
|
.then(
|
||||||
|
|||||||
Reference in New Issue
Block a user