Commit bcfe5e9
fix(util): guard _datetime_from_weaviate_str against empty string input
Empty string is the protobuf wire-format default for an unset string
field. Calling string[-1] on "" raises IndexError, crashing gRPC
deserialization for any object with an unset date property. Return
datetime.min for empty input, matching the existing behaviour for
year-zero dates.
Fixes #20521 parent 22a12e4 commit bcfe5e9
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
| 462 | + | |
461 | 463 | | |
462 | 464 | | |
463 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
| 754 | + | |
| 755 | + | |
754 | 756 | | |
755 | 757 | | |
756 | 758 | | |
| |||
0 commit comments