Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jformacek committed Nov 6, 2023
1 parent 0a1e8eb commit 5cd546d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Commands/Public/New-CosmosDocuument.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ function New-CosmosDocument
if($PSCmdlet.ParameterSetName -eq 'DocumentObject')
{
$Document = $DocumentObject | ConvertTo-Json -Depth 99 -Compress
#when in pipeline in PS5.1, parameter retains value across invocations
$PartitionKey = @()
foreach($attribute in $PartitionKeyAttribute)
{
$PartitionKey+=$DocumentObject."$attribute"
Expand Down
3 changes: 3 additions & 0 deletions Commands/Public/Set-CosmosDocument.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ function Set-CosmosDocument
{
#to change document Id, you cannot use DocumentObject parameter set
$Id = $DocumentObject.id
#when in pipeline in PS5.1, parameter retains value across invocations
$PartitionKey = @()

foreach($attribute in $PartitionKeyAttribute)
{
$PartitionKey+=$DocumentObject."$attribute"
Expand Down

0 comments on commit 5cd546d

Please sign in to comment.