Skip to content

Commit

Permalink
Merge pull request #138 from ClaudioESSilva/SubscriptionFix
Browse files Browse the repository at this point in the history
Subscription fix
  • Loading branch information
jtarquino authored Jan 31, 2018
2 parents 25b6dbb + 15c5506 commit 034f4b9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ function Copy-RsSubscription
Begin
{
$Proxy = New-RsWebServiceProxyHelper -BoundParameters $PSBoundParameters
}
Process
{

#region Input Validation
$itemNullOrEmpty = [System.String]::IsNullOrEmpty($RsItem)
$folderNullOrEmpty = [System.String]::IsNullOrEmpty($RsFolder)
Expand All @@ -103,7 +101,9 @@ function Copy-RsSubscription
throw 'Both folder and report path were specified! Please specify either -RsFolder or -RsItem.'
}
#endregion Input Validation

}
Process
{
try
{
foreach ($sub in $Subscription)
Expand All @@ -127,7 +127,7 @@ function Copy-RsSubscription
if ($PSCmdlet.ShouldProcess($RsItem, "Creating new subscription"))
{
Write-Verbose "Creating Subscription..."
if ($subscription.IsDataDriven)
if ($sub.IsDataDriven)
{
$subscriptionId = $Proxy.CreateDataDrivenSubscription($RsItem, $sub.DeliverySettings, $sub.DataRetrievalPlan, $sub.Description, $sub.EventType, $sub.MatchData, $sub.Values)
}
Expand Down

0 comments on commit 034f4b9

Please sign in to comment.