Closed hege-li closed 2 years ago
This is fixed in v0.1.16. See commit https://github.com/cesbit/aiowmi/commit/3ecbd3e18fa96eec0605351ae9f31372be26ae9b
When using ignore_defaults=True
it is still possible to get None
value for missing properties but leaving ignore_defaults
as False
now sets default values, thus 0
for Milliseconds in the example.
Describe the bug Query: Select * from Win32_UTCTime
Result when run at different seconds 59,0,1:
Year|Month|Day|DayOfWeek|WeekInMonth|Quarter|Hour|Minute|Second|Milliseconds 2022|6|17|5|3|2|11|32|59|(null) 2022|6|17|5|3|2|11|33|(null)|(null) 2022|6|17|5|3|2|11|33|1|(null)
As you see, Milliseconds is always None/null. When Second is 0, it ends up as None/null too.
Old wmic linux-binary shows them correctly as 0 (even Milliseconds which is "not implemented" according to Microsoft docs).
If using ignore_missing=True, Second/Milliseconds disappear completely from results.
To Reproduce
Expected behavior Value should be 0 instead of None/null