Skip to content

hireDate parsing error in Coach model #15

@AjJ132

Description

@AjJ132

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions