Skip to content

Commit

Permalink
fix handling of empty string values
Browse files Browse the repository at this point in the history
  • Loading branch information
sir-sigurd committed Aug 3, 2023
1 parent 3c35f4c commit e19e58d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lambdas/es/indexer/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def do_index(
def _try_parse_date(s: str) -> datetime.datetime:
# XXX: do we need to support more formats?
# XXX: do we need to preserve UTC timezone?
if s[-1] == "Z":
if s[-1:] == "Z":
s = s[:-1]
try:
return datetime.datetime.fromisoformat(s)
Expand Down

0 comments on commit e19e58d

Please sign in to comment.