Skip to content

Commit a852415

Browse files
committed
GID-3576 porting kratos problemtype to tcl9, avoid bugs several tester cases (was writing "dictnull" instead null and then kratos python is printing errors and cannot calculate)
1 parent e9dbc3c commit a852415

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

kratos.gid/scripts/Writing/WriteProjectParameters.tcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ proc write::tcl2json { value } {
5656
# Tcl has *no* null value at all; empty strings are semantically
5757
# different and absent variables aren't values. So cheat!
5858
return $value
59+
} elseif {$value eq "dictnull"} {
60+
return null
5961
} elseif {[string is integer -strict $value]} {
6062
return [expr {$value}]
6163
} elseif {[string is double -strict $value]} {
@@ -107,6 +109,8 @@ proc write::tcl2jsonstrings { value } {
107109
# Tcl has *no* null value at all; empty strings are semantically
108110
# different and absent variables aren't values. So cheat!
109111
return $value
112+
} elseif {$value eq "dictnull"} {
113+
return null
110114
} elseif {[string is integer -strict $value]} {
111115
return [json::write string $value]
112116
} elseif {[string is double -strict $value]} {

0 commit comments

Comments
 (0)