Skip to content

Commit

Permalink
patch bug
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Apr 23, 2024
1 parent 2154438 commit bb80a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cgi-bin/afos/retrieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class MyModel(CGIModel):
@field_validator("sdate", "edate", mode="before")
def allow_str_or_none(cls, v):
"""pydantic can't seem to handle this."""
if len(v) < 10:
if 8 <= len(v) < 10:
# zero pad
return "-".join(f"{int(v):02.0f}" for v in v.split("-"))
return None if v == "" else v
Expand Down

0 comments on commit bb80a4f

Please sign in to comment.