Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hireDate parsing error in Coach model #15

Open
AjJ132 opened this issue Oct 14, 2024 · 0 comments
Open

hireDate parsing error in Coach model #15

AjJ132 opened this issue Oct 14, 2024 · 0 comments

Comments

@AjJ132
Copy link

AjJ132 commented Oct 14, 2024

Description

The Coach model is currently throwing a validation error when parsing the hireDate field from the CFBD API. This is causing the data extraction process to fail.

Current Behavior

The hireDate field is defined as a required date type in the Coach model.
Some records from the API have null or improperly formatted hireDate values.
This leads to a ValidationError when trying to create Coach objects.

Expected Behavior

The Coach model should be able to handle null or string hireDate values.
The data extraction process should complete successfully for all records.

Proposed Solution

Change the hire_date field in the Coach model to be an optional string:

hire_date: Optional[str] = Field(default=None, alias="hireDate")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant