Skip to content

Commit 2a07457

Browse files
committed
Fix compatibility level check to compare against supported levels directly
1 parent 5b67e71 commit 2a07457

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/Classes/020.SqlDatabase.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ class SqlDatabase : SqlResourceBase
991991
{
992992
$supportedLevels = $serverObject | Get-SqlDscCompatibilityLevel
993993

994-
if ($properties.CompatibilityLevel.ToString() -notin $supportedLevels.ToString())
994+
if ($properties.CompatibilityLevel.ToString() -notin $supportedLevels)
995995
{
996996
$errorMessage = $this.localizedData.InvalidCompatibilityLevel -f $properties.CompatibilityLevel.ToString(), $this.InstanceName
997997

0 commit comments

Comments
 (0)