Skip to content

Commit 041221e

Browse files
author
Matt Wilkinson
committed
Fix a couple of conditions
1 parent 9a47115 commit 041221e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Microsoft.Xrm.Data.PowerShell/Microsoft.Xrm.Data.PowerShell.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ function Import-CrmSolution{
22692269
$records = (Get-CrmRecords -conn $conn -EntityLogicalName importjob -FilterAttribute importjobid -FilterOperator eq -FilterValue $importId -Fields data,completedon,startedon,progress).CrmRecords
22702270
$import = if ($records.Count -gt 0) { $records[0] } else { $null }
22712271
} catch {
2272-
if($transientFailureCount > 5){
2272+
if($transientFailureCount -gt 5){
22732273
Write-Error "Import Job status check FAILED 5 times this could be due to a bug where the service returns a 401. Throwing lastException:";
22742274
throw $conn.LastCrmException
22752275
}
@@ -2292,7 +2292,7 @@ function Import-CrmSolution{
22922292
}
22932293

22942294
#Check for import completion
2295-
if($import.completedon -eq $null -and $importManifest.result.result -ne "success"){
2295+
if($null -eq $import.completedon -and $importManifest.result.result -ne "success"){
22962296
$isProcessing = $true
22972297
}
22982298
else {

0 commit comments

Comments
 (0)