File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -52,4 +52,3 @@ allcommands.ps1
52
52
.aider /aider.chat.history.md
53
53
.aider /aider.input.history
54
54
.aider /aider.llm.history
55
- ** /.claude /settings.local.json
Original file line number Diff line number Diff line change @@ -111,11 +111,11 @@ function Convert-DbaMaskingValue {
111
111
} else {
112
112
switch ($DataType.ToLower ()) {
113
113
{ $_ -in ' bit' , ' bool' } {
114
- if ($item -match " ^[0-1 ]$" ) {
114
+ if ($item -match " ^[01 ]$" ) {
115
115
$newValue = " $item "
116
- } elseif ($item -in " True " , " true" , " TRUE " ) {
116
+ } elseif ($item -eq " true" ) {
117
117
$newValue = " 1"
118
- } elseif ($item -in " False " , " false" , " FALSE " ) {
118
+ } elseif ($item -eq " false" ) {
119
119
$newValue = " 0"
120
120
} else {
121
121
$errorMessage = " Value '$ ( $item ) ' is not valid BIT or BOOL"
Original file line number Diff line number Diff line change @@ -957,14 +957,10 @@ function Invoke-DbaDbDataMasking {
957
957
958
958
# Convert the values so they can used in T-SQL
959
959
try {
960
- if ($row .($columnobject.Name ) -eq ' ' ) {
961
- if ($columnobject.ColumnType -in ' decimal' ) {
962
- $newvalue = " 0.00"
963
- }
964
- $convertedValue = Convert-DbaMaskingValue - Value $newvalue - DataType $columnobject.ColumnType - Nullable:$columnobject.Nullable - EnableException
965
- } else {
966
- $convertedValue = Convert-DbaMaskingValue - Value $newValue - DataType $columnobject.ColumnType - Nullable:$columnobject.Nullable - EnableException
960
+ if ($row .($columnobject.Name ) -eq ' ' -and $columnobject.ColumnType -in ' decimal' ) {
961
+ $newvalue = " 0.00"
967
962
}
963
+ $convertedValue = Convert-DbaMaskingValue - Value $newValue - DataType $columnobject.ColumnType - Nullable:$columnobject.Nullable - EnableException
968
964
969
965
if ($convertedValue.ErrorMessage ) {
970
966
$maskingErrorFlag = $true
You can’t perform that action at this time.
0 commit comments