mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-04-22 17:44:58 +01:00
Fix how bulk delete operation gets called when no partition key
This commit is contained in:
parent
6f7b7220b4
commit
088389d413
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user