Commit bf9bdfc
committed
Fix bug in
The sample value can also be `None`, in which case we can't access to
`sample.value.base_value`. In that case we just cast the existing sample
as it doesn't matter which type the value has when it is `None`,
avoiding the extra copying.
Signed-off-by: Leandro Lucarella <[email protected]>GridFrequency quantity conversion1 parent e4f8356 commit bf9bdfc
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments